Disable error page for one location?

Nicholas Sherlock n.sherlock at gmail.com
Sun Mar 4 09:13:48 UTC 2012


Hi everyone,

I'm using Nginx to proxy to an Apache backend. The backend generates a wide 
variety of ugly 404- and 500-code error messages that I don't really want to 
show to the end-user, so in my server block I've got:

proxy_intercept_errors on;
error_page 500 502 503 504 /error/500.html;
error_page 400 /error/404.html;

The backend scripts in one of my locations generate useful 404 (but not 500) 
messages that I want to pass through to the client. How can I pass through
just 404 errors in one particular location from my backend to the client?

Thanks,
Nicholas Sherlock



More information about the nginx mailing list