Welcome! Log In Create A New Profile

Advanced

Re: custom 502 error page is ignored

Maxim Dounin
November 26, 2012 03:38AM
Hello!

On Sun, Nov 25, 2012 at 09:52:43AM -0500, gus0253 wrote:

> Dear all,
>
> I'm currently wondering why nginx ignores my custom 502 Bad Gateway page and
> instead serves the internal 502 error page.
> I'm using nginx version 1.2.4 and php-fpm 5.4.8
>
> The behaivior occures every time and is reproducible:
> If I stop php-fpm and request an existing php file my custom 502 error page
> is shown, so everything is fine.
> But if I request a non existing php file nginx shows me the nginx internal
> 502 error page.
>
> I don't know why my custom 502 error page is ignored, because it's a static
> html file.
> Do you have any tipps for me?

[...]

The 502 error happens while processing 404 error, and by default
nginx won't do another error_page redirection after first one. If
you really want nginx to handle multiple error_page redirections,
use the "recursive_error_pages" directive, see here:

http://nginx.org/r/recursive_error_pages

You should be careful to avoid loops though.

--
Maxim Dounin
http://nginx.com/support.html

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

custom 502 error page is ignored

gus0253 November 25, 2012 09:52AM

Re: custom 502 error page is ignored

Maxim Dounin November 26, 2012 03:38AM

Re: custom 502 error page is ignored

Ruslan Ermilov November 26, 2012 03:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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