Welcome! Log In Create A New Profile

Advanced

Re: Disable error page for one location?

Francis Daly
March 04, 2012 04:36AM
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@daoine.org

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

Disable error page for one location?

Nicholas Sherlock March 04, 2012 04:16AM

Re: Disable error page for one location?

Francis Daly March 04, 2012 04:36AM

Re: Disable error page for one location?

Nicholas Sherlock March 04, 2012 06:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 205
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