Nginx 404 showing when I configured for a custom 404 page

Quintin Par quintinpar at
Thu May 17 23:34:14 UTC 2012

Hi all,

I have a 404 custom page set like this

        error_page  404        = @errorpages;

        error_page  500        = @errorpages;

        location @errorpages {

                    root /var/www/;


                    proxy_pass http://localhost:82;

                    proxy_set_header   Host             $host;

                    proxy_set_header   X-Real-IP        $remote_addr;

                    proxy_set_header Accept-Encoding "";

                    proxy_ignore_headers Set-Cookie;

                    proxy_ignore_headers Cache-Control;

                    proxy_ignore_headers Expires;

                    proxy_ignore_headers X-Accel-Expires;

                    add_header X-Cache-Status $upstream_cache_status;

                    proxy_cache             cache;

                    proxy_cache_key         $request_uri;

            proxy_cache_use_stale   updating;


But every now and then I am hitting the nginx vanilla 404 pages, especially
when hitting rate limiting.

How do I close the gaps to ensure I am showing only the custom 404’s ?

- Quintin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list