Welcome! Log In Create A New Profile

Advanced

fastcgi_intercept_errors & error_page

howard chen
November 05, 2012 12:14PM
According to the doc:
http://wiki.nginx.org/HttpFastcgiModule#fastcgi_intercept_errors

Note: You need to explicitly define the error_page handler for this for it
to be useful. As Igor says, "nginx does not intercept an error if there is
no custom handler for it it does not show its default pages. This allows to
intercept some errors, while passing others as are."

Actually I still can't understand the exact meaning, so I have done some
experimentd.

1. turn on fastcgi_intercept_errors,
- in the backend php/fcgi send 404 header,
- set the error_page (php)

Result: nginx use the default error template

2. turn off fastcgi_intercept_errors,
- in the backend php/fcgi send 404 header
- set the error_page (php)

Result: now the custom error_page (php) is being used.

So it seems to me that* fastcgi_intercept_errors should be off and set
the error_page *if I need to specify custom error handler, is
this interoperation correct?


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

fastcgi_intercept_errors & error_page

howard chen November 05, 2012 12:14PM

Re: fastcgi_intercept_errors & error_page

Maxim Dounin November 08, 2012 10:36PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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