changeset 862:6a40b8e7219a

Documented the "fastcgi_catch_stderr" directive.
author Homutov Vladimir <vl@nginx.com>
date Tue, 12 Mar 2013 14:45:25 +0400
parents 6ae71688f2c2
children 2dd85d82e4d5
files xml/en/docs/http/ngx_http_fastcgi_module.xml xml/ru/docs/http/ngx_http_fastcgi_module.xml
diffstat 2 files changed, 54 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_fastcgi_module.xml	Tue Mar 12 14:43:07 2013 +0400
+++ b/xml/en/docs/http/ngx_http_fastcgi_module.xml	Tue Mar 12 14:45:25 2013 +0400
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_fastcgi_module"
         link="/en/docs/http/ngx_http_fastcgi_module.html"
         lang="en"
-        rev="5">
+        rev="6">
 
 <section id="summary">
 
@@ -420,6 +420,32 @@
 </directive>
 
 
+<directive name="fastcgi_catch_stderr">
+<syntax><value>string</value></syntax>
+<default/>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Sets a string to search for in the error stream of a response
+received from a FastCGI server.
+If the <value>string</value> is found then it is considered that the FastCGI
+server returned an <link id="fastcgi_next_upstream">invalid response</link>.
+This allows to handle application errors in nginx, for example:
+<example>
+location /php {
+    fastcgi_pass backend:9000;
+    ...
+    fastcgi_catch_stderr "PHP Fatal error";
+    fastcgi_next_upstream error timeout invalid_header;
+}
+</example>
+</para>
+
+</directive>
+
+
 <directive name="fastcgi_connect_timeout">
 <syntax><value>time</value></syntax>
 <default>60s</default>
--- a/xml/ru/docs/http/ngx_http_fastcgi_module.xml	Tue Mar 12 14:43:07 2013 +0400
+++ b/xml/ru/docs/http/ngx_http_fastcgi_module.xml	Tue Mar 12 14:45:25 2013 +0400
@@ -10,7 +10,7 @@
 <module name="Модуль ngx_http_fastcgi_module"
         link="/ru/docs/http/ngx_http_fastcgi_module.html"
         lang="ru"
-        rev="5">
+        rev="6">
 
 <section id="summary">
 
@@ -418,6 +418,32 @@
 </directive>
 
 
+<directive name="fastcgi_catch_stderr">
+<syntax><value>строка</value></syntax>
+<default/>
+<context>http</context>
+<context>server</context>
+<context>location</context>
+
+<para>
+Задаёт строку для поиска в потоке ошибок ответа,
+полученного от FastCGI-сервера.
+Если <value>строка</value> найдена, то считается, что FastCGI-сервер
+вернул <link id="fastcgi_next_upstream">неверный ответ</link>.
+Это позволяет обрабатывать ошибки приложений в nginx, например:
+<example>
+location /php {
+    fastcgi_pass backend:9000;
+    ...
+    fastcgi_catch_stderr "PHP Fatal error";
+    fastcgi_next_upstream error timeout invalid_header;
+}
+</example>
+</para>
+
+</directive>
+
+
 <directive name="fastcgi_connect_timeout">
 <syntax><value>время</value></syntax>
 <default>60s</default>