Nginx fastcgi_intercept_errors

Oleg V. Khrustov oleg.khrustov at gmail.com
Fri Nov 29 13:05:33 UTC 2013


1) /etc/init.d/nginx configtest
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

It was definitely reloaded prior doing any tests.


2) I have a separate access log file for this  specific (root) location
with custon log format where I captured 504 response.  It is set only for
root location where I captured unexpected response code.


Thanks,
OK


On Fri, Nov 29, 2013 at 4:59 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Fri, Nov 29, 2013 at 03:36:18PM +0400, Oleg V. Khrustov wrote:
>
> > nginx/1.5.4 doesnt intercept fastcgi errors.
> > location / {
> > ....
> > fastcgi_pass bg;
> >                 error_page 500 502 503 504 408 404 =204 /204.htm;
> >                 fastcgi_intercept_errors on;
> >
> > .....
> > }
> >
> > However in root location access log we still see
> >
> > 91.192.148.232 - - [29/Nov/2013:13:39:20 +0400] "POST / HTTP/1.1" 504 182
> > "-" "-" "0.138"
> >
> > And tcpdump capture shows that we still send 504:
> >
> > Py...HTTP/1.1 504 Gateway Time-out
> > Server: nginx/1.5.4
>
> [...]
>
> > What can be wrong here?
>
> Most likely reasons, in no particular order:
>
> - You've forgot to reload configuration, or the configuration was
>   rejected due to errors and you've missed it.
>
> - The request is handled in other location and/or server, not
>   the one you are looking at.
>
> --
> Maxim Dounin
> http://nginx.org/en/donation.html
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20131129/faa9d9c0/attachment.html>


More information about the nginx mailing list