Welcome! Log In Create A New Profile

Advanced

Showing native 404 page and not the custom 404 in some circumstances

Quintin Par
March 01, 2012 01:26AM
I have a 404 page defined as follows. If I purposefully hit a non valid
page I see the custom 404 page. But sometimes due to rate limiting and
probably busy CPU I see the default nginx 404 page.

I can’t narrow this down to the precise reason, but I keep seeing this
every now and then. I don’t run a very powerful VM

How do I show the custom 404 always?

error_page 404 = @errorpages;

location @errorpages {

root /var/www/prod/cucumbertown/templates/;

internal;

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 jscss;

proxy_cache_key $request_uri;

proxy_cache_use_stale updating;

}

-Quintin
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Showing native 404 page and not the custom 404 in some circumstances

Quintin Par March 01, 2012 01:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 281
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready