Disable error page for one location?

Francis Daly francis at daoine.org
Sun Mar 4 09:35:29 UTC 2012


On Sun, Mar 04, 2012 at 09:13:48AM +0000, Nicholas Sherlock wrote:

Hi there,

> 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?

Untested, but:

"error_page" determines which response codes are *not* passed through as-is.

And directive values between levels are generally inherited or replaced,
but not added.

So, in the location you care about, repeating your server-level error_page
directives without the 404 one, should Just Work.

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list