error_page custom 404 page

Marcello Lorenzi cello86 at gmail.com
Wed Jun 12 15:11:50 UTC 2024


Hi;
the 404 page is hosted on the same server.

Marcello

Il giorno mer 12 giu 2024 alle ore 16:39 nanaya <me at nanaya.net> ha scritto:

> Hi,
>
> On Wed, Jun 12, 2024, at 22:47, Marcello Lorenzi wrote:
> > error_page 404 =404 https://$host/404/;
> >
> > We noticed that the client receives a 302 code from the initial page to
> the 404 page and the 404 page gives a 200 code. Into the access_log we
> can't identify the 404 errors.
> >
>
> As per documentation when a url is defined for error page:
>
> > In this case, by default, the response code 302 is returned to the
> client. It can only be changed to one of the redirect status codes (301,
> 302, 303, 307, and 308).
>
> Either make it just /404/, or if it's on a different server, make an
> internal location block which proxies to that page.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://freenginx.org/pipermail/nginx/attachments/20240612/7d5ecef2/attachment.htm>


More information about the nginx mailing list