fastcgi_catch_stderr

Syntax: fastcgi_catch_stderr string;
Default:
Context: http, server, location

Sets a string to search for in the error stream of a response received from a FastCGI server. If the string is found then it is considered that the FastCGI server has returned an invalid response. This allows handling application errors in nginx, for example:

location /php {
    fastcgi_pass backend:9000;
    ...
    fastcgi_catch_stderr "PHP Fatal error";
    fastcgi_next_upstream error timeout invalid_header;
}
doc_nginx
2017-02-09 07:06:04
Comments
Leave a Comment

Please login to continue.