fastcgi_intercept_errors & error_page

howard chen howachen at
Mon Nov 5 17:12:05 UTC 2012

According to the doc:

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

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?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list