Getting built in 404 instead of my custom one

Ian M. Evans ianevans at digitalhit.com
Tue Oct 9 02:55:57 UTC 2012


On Mon, October 8, 2012 10:16 pm, Ian M. Evans wrote:
> On Mon, October 8, 2012 9:49 pm, Ian M. Evans wrote:
>> Just noticed that my custom 404 page isn't getting served in all
>> circumstances and I'm getting the bare internal 404 at times. Looking at
>> the debug, it seems to be choosing my 404, but somehow not displaying
>> it:
>
> here's a longer bit of the debug:


hmm, disabled the fastcgi cache and it served my error file okay. enabled
the cache and it served the nginx internal 404.

Here's our cache setup:

fastcgi_cache_path /var/lib/nginx/fastcgicache levels=1:2
keys_zone=MYCACHE:5m inactive=2h max_size=1g loader_files=1000
loader_threshold=2000;
map $http_cookie $no_cache { default 0; ~SESS 1; }
fastcgi_cache_key "$scheme$request_method$host$request_uri";
add_header X-My-Cache $upstream_cache_status;

map $uri $no_cache_dirs {
   default 0;
   ~^/(?:phpMyAdmin|rather|poll|webmail|skewed|blogs|galleries|pixcache) 1;
}

Should I toss the custom 404 into a non-cached subdir?



More information about the nginx mailing list