Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_fastcgi_module.xml @ 1289:57fc39924d42
Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Fri, 12 Sep 2014 15:31:55 +0400 |
parents | 5be7716a5684 |
children | f5cc9f2aef9a |
rev | line source |
---|---|
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
7 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 <module name="Module ngx_http_fastcgi_module" |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 link="/en/docs/http/ngx_http_fastcgi_module.html" |
589 | 12 lang="en" |
1289
57fc39924d42
Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1246
diff
changeset
|
13 rev="17"> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 <section id="summary"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 <para> |
966 | 18 The <literal>ngx_http_fastcgi_module</literal> module allows passing |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 requests to a FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 <section id="example" name="Example Configuration"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 location / { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 fastcgi_pass localhost:9000; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 fastcgi_index index.php; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 fastcgi_param QUERY_STRING $query_string; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 fastcgi_param REQUEST_METHOD $request_method; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 fastcgi_param CONTENT_TYPE $content_type; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 fastcgi_param CONTENT_LENGTH $content_length; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 } |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 <section id="directives" name="Directives"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 |
772
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
47 <directive name="fastcgi_bind"> |
815
ed29fd8be462
*_bind: variables support and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
793
diff
changeset
|
48 <syntax><value>address</value> | <literal>off</literal></syntax> |
772
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
49 <default/> |
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
50 <context>http</context> |
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
51 <context>server</context> |
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
52 <context>location</context> |
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
53 <appeared-in>0.8.22</appeared-in> |
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
54 |
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
55 <para> |
966 | 56 Makes outgoing connections to a FastCGI server originate |
772
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
57 from the specified local IP <value>address</value>. |
966 | 58 Parameter value can contain variables (1.3.12). |
815
ed29fd8be462
*_bind: variables support and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
793
diff
changeset
|
59 The special value <literal>off</literal> (1.3.12) cancels the effect |
ed29fd8be462
*_bind: variables support and inheritance.
Ruslan Ermilov <ru@nginx.com>
parents:
793
diff
changeset
|
60 of the <literal>fastcgi_bind</literal> directive |
966 | 61 inherited from the previous configuration level, which allows the |
62 system to auto-assign the local IP address. | |
772
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
63 </para> |
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
64 |
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
65 </directive> |
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
66 |
ce121bf644f5
Documented "bind" directive in memcached, fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
67 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 <directive name="fastcgi_buffer_size"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 <syntax><value>size</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 <default>4k|8k</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 <para> |
966 | 76 Sets the <value>size</value> of the buffer used for reading the first part |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
77 of the response received from the FastCGI server. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 This part usually contains a small response header. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 By default, the buffer size is equal to the size of one |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 buffer set by the <link id="fastcgi_buffers"/> directive. |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
81 It can be made smaller, however. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 |
995
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
87 <directive name="fastcgi_buffering"> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
88 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
89 <default>on</default> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
90 <context>http</context> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
91 <context>server</context> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
92 <context>location</context> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
93 <appeared-in>1.5.6</appeared-in> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
94 |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
95 <para> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
96 Enables or disables buffering of responses from the FastCGI server. |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
97 </para> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
98 |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
99 <para> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
100 When buffering is enabled, nginx receives a response from the FastCGI server |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
101 as soon as possible, saving it into the buffers set by the |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
102 <link id="fastcgi_buffer_size"/> and <link id="fastcgi_buffers"/> directives. |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
103 If the whole response does not fit into memory, a part of it can be saved |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
104 to a <link id="fastcgi_temp_path">temporary file</link> on the disk. |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
105 Writing to temporary files is controlled by the |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
106 <link id="fastcgi_max_temp_file_size"/> and |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
107 <link id="fastcgi_temp_file_write_size"/> directives. |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
108 </para> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
109 |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
110 <para> |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
111 When buffering is disabled, the response is passed to a client synchronously, |
995
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
112 immediately as it is received. |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
113 nginx will not try to read the whole response from the FastCGI server. |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
114 The maximum size of the data that nginx can receive from the server |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
115 at a time is set by the <link id="fastcgi_buffer_size"/> directive. |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
116 </para> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
117 |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
118 <para> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
119 Buffering can also be enabled or disabled by passing |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
120 “<literal>yes</literal>” or “<literal>no</literal>” in the |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
121 <header>X-Accel-Buffering</header> response header field. |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
122 This capability can be disabled using the |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
123 <link id="fastcgi_ignore_headers"/> directive. |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
124 </para> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
125 |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
126 </directive> |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
127 |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
128 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 <directive name="fastcgi_buffers"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 <syntax><value>number</value> <value>size</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 <default>8 4k|8k</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
134 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
136 <para> |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
137 Sets the <value>number</value> and <value>size</value> of the |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 buffers used for reading a response from the FastCGI server, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 for a single connection. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
140 By default, the buffer size is equal to one memory page. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 This is either 4K or 8K, depending on a platform. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
144 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
147 <directive name="fastcgi_busy_buffers_size"> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
148 <syntax><value>size</value></syntax> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
149 <default>8k|16k</default> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
150 <context>http</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
151 <context>server</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
152 <context>location</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
153 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
154 <para> |
995
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
155 When <link id="fastcgi_buffering">buffering</link> of responses from the FastCGI |
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
156 server is enabled, limits the total <value>size</value> of buffers that |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
157 can be busy sending a response to the client while the response is not |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
158 yet fully read. |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
159 In the meantime, the rest of the buffers can be used for reading the response |
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
160 and, if needed, buffering part of the response to a temporary file. |
966 | 161 By default, <value>size</value> is limited by the size of two buffers set by the |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
162 <link id="fastcgi_buffer_size"/> and <link id="fastcgi_buffers"/> directives. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
163 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
164 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
165 </directive> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
166 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
167 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
168 <directive name="fastcgi_cache"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
169 <syntax><value>zone</value> | <literal>off</literal></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
170 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
171 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
172 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
173 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
174 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
175 <para> |
575
ebcb351d9eb3
Consistently using the term "shared memory zone".
Ruslan Ermilov <ru@nginx.com>
parents:
509
diff
changeset
|
176 Defines a shared memory zone used for caching. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
177 The same zone can be used in several places. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
178 The <literal>off</literal> parameter disables caching inherited |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
179 from the previous configuration level. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
180 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
181 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
182 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
183 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
184 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
185 <directive name="fastcgi_cache_bypass"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
186 <syntax><value>string</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
187 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
188 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
189 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
190 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
191 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
192 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
193 Defines conditions under which the response will not be taken from a cache. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 If at least one value of the string parameters is not empty and is not |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 equal to “0” then the response will not be taken from the cache: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
196 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 fastcgi_cache_bypass $cookie_nocache $arg_nocache$arg_comment; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
198 fastcgi_cache_bypass $http_pragma $http_authorization; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
199 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
200 Can be used along with the <link id="fastcgi_no_cache"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
201 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
202 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
203 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
204 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
205 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
206 <directive name="fastcgi_cache_key"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
207 <syntax><value>string</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
208 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
209 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
211 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
212 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
213 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
214 Defines a key for caching, for example |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
215 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
216 fastcgi_cache_key localhost:9000$request_uri; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
217 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
218 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
219 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
220 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
221 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
222 |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
223 <directive name="fastcgi_cache_lock"> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
224 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
225 <default>off</default> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
226 <context>http</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
227 <context>server</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
228 <context>location</context> |
310
86732337c730
Added a historical information for proxy_cache_lock, proxy_cache_lock_timeout,
Ruslan Ermilov <ru@nginx.com>
parents:
302
diff
changeset
|
229 <appeared-in>1.1.12</appeared-in> |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
230 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
231 <para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
232 When enabled, only one request at a time will be allowed to populate |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
233 a new cache element identified according to the <link id="fastcgi_cache_key"/> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
234 directive by passing a request to a FastCGI server. |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
235 Other requests of the same cache element will either wait |
966 | 236 for a response to appear in the cache or the cache lock for |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
237 this element to be released, up to the time set by the |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
238 <link id="fastcgi_cache_lock_timeout"/> directive. |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
239 </para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
240 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
241 </directive> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
242 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
243 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
244 <directive name="fastcgi_cache_lock_timeout"> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
245 <syntax><value>time</value></syntax> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
246 <default>5s</default> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
247 <context>http</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
248 <context>server</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
249 <context>location</context> |
310
86732337c730
Added a historical information for proxy_cache_lock, proxy_cache_lock_timeout,
Ruslan Ermilov <ru@nginx.com>
parents:
302
diff
changeset
|
250 <appeared-in>1.1.12</appeared-in> |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
251 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
252 <para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
253 Sets a timeout for <link id="fastcgi_cache_lock"/>. |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
254 </para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
255 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
256 </directive> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
257 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
258 |
793
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
259 <directive name="fastcgi_cache_methods"> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
260 <syntax> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
261 <literal>GET</literal> | |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
262 <literal>HEAD</literal> | |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
263 <literal>POST</literal> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
264 ...</syntax> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
265 <default>GET HEAD</default> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
266 <context>http</context> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
267 <context>server</context> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
268 <context>location</context> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
269 <appeared-in>0.7.59</appeared-in> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
270 |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
271 <para> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
272 If the client request method is listed in this directive then |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
273 the response will be cached. |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
274 “<literal>GET</literal>” and “<literal>HEAD</literal>” methods are always |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
275 added to the list, though it is recommended to specify them explicitly. |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
276 See also the <link id="fastcgi_no_cache"/> directive. |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
277 </para> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
278 |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
279 </directive> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
280 |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
281 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
282 <directive name="fastcgi_cache_min_uses"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
283 <syntax><value>number</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
284 <default>1</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
285 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
286 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
287 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
288 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
289 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
290 Sets the <value>number</value> of requests after which the response |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
291 will be cached. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
292 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
293 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
294 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
295 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
296 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
297 <directive name="fastcgi_cache_path"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
298 <syntax> |
364 | 299 <value>path</value> |
300 [<literal>levels</literal>=<value>levels</value>] | |
301 <literal>keys_zone</literal>=<value>name</value>:<value>size</value> | |
302 [<literal>inactive</literal>=<value>time</value>] | |
508
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
303 [<literal>max_size</literal>=<value>size</value>] |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
304 [<literal>loader_files</literal>=<value>number</value>] |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
305 [<literal>loader_sleep</literal>=<value>time</value>] |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
306 [<literal>loader_threshold</literal>=<value>time</value>]</syntax> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
307 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
308 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
309 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
310 <para> |
966 | 311 Sets the path and other parameters of a cache. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
312 Cache data are stored in files. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
313 Both the key and file name in a cache are a result of |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
314 applying the MD5 function to the proxied URL. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
315 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
316 The <literal>levels</literal> parameter defines hierarchy levels of a cache. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
317 For example, in the following configuration |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
318 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
319 fastcgi_cache_path /data/nginx/cache levels=1:2 keys_zone=one:10m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
320 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
321 file names in a cache will look like this: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
322 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
323 /data/nginx/cache/<emphasis>c</emphasis>/<emphasis>29</emphasis>/b7f54b2df7773722d382f4809d650<emphasis>29c</emphasis> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
324 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
325 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
326 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
327 <para> |
966 | 328 A cached response is first written to a temporary file, |
329 and then the file is renamed. | |
330 Starting from version 0.8.9, temporary files and the cache can be put on | |
331 different file systems. | |
332 However, be aware that in this case a file is copied | |
333 across two file systems instead of the cheap renaming operation. | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
334 It is thus recommended that for any given location both cache and a directory |
966 | 335 holding temporary files, set by the <link id="fastcgi_temp_path"/> directive, |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
336 are put on the same file system. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
337 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
338 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
339 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
340 In addition, all active keys and information about data are stored |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
341 in a shared memory zone, whose <value>name</value> and <value>size</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
342 are configured by the <literal>keys_zone</literal> parameter. |
1189
f25d00109de0
Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1185
diff
changeset
|
343 One megabyte zone can store about 8 thousand keys. |
f25d00109de0
Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1185
diff
changeset
|
344 </para> |
f25d00109de0
Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1185
diff
changeset
|
345 |
f25d00109de0
Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1185
diff
changeset
|
346 <para> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
347 Cached data that are not accessed during the time specified by the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
348 <literal>inactive</literal> parameter get removed from the cache |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
349 regardless of their freshness. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
350 By default, <literal>inactive</literal> is set to 10 minutes. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
351 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
352 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
353 <para> |
966 | 354 The special “cache manager” process monitors the maximum cache size set |
355 by the <literal>max_size</literal> parameter. | |
356 When this size is exceeded, it removes the least recently used data. | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
357 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
358 |
508
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
359 <para> |
966 | 360 A minute after the start the special “cache loader” process is activated. |
361 It loads information about previously cached data stored on file system | |
508
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
362 into a cache zone. |
966 | 363 The loading is done in iterations. |
508
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
364 During one iteration no more than <literal>loader_files</literal> items |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
365 are loaded (by default, 100). |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
366 Besides, the duration of one iteration is limited by the |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
367 <literal>loader_threshold</literal> parameter (by default, 200 milliseconds). |
966 | 368 Between iterations, a pause configured by the <literal>loader_sleep</literal> |
369 parameter (by default, 50 milliseconds) is made. | |
508
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
370 </para> |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
371 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
372 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
373 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
374 |
1028
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
375 <directive name="fastcgi_cache_purge"> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
376 <syntax>string ...</syntax> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
377 <default/> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
378 <context>http</context> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
379 <context>server</context> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
380 <context>location</context> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
381 <appeared-in>1.5.7</appeared-in> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
382 |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
383 <para> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
384 Defines conditions under which the request will be considered a cache |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
385 purge request. |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
386 If at least one value of the string parameters is not empty and is not equal |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
387 to “0” then the cache entry with a corresponding |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
388 <link id="fastcgi_cache_key">cache key</link> is removed. |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
389 The result of successful operation is indicated by returning |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
390 the <http-status code="204" text="No Content"/> response. |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
391 </para> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
392 |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
393 <para> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
394 If the <link id="fastcgi_cache_key">cache key</link> of a purge request ends |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
395 with an asterisk (“<literal>*</literal>”), all cache entries matching the |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
396 wildcard key will be removed from the cache. |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
397 </para> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
398 |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
399 <para> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
400 Example configuration: |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
401 <example> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
402 fastcgi_cache_path /data/nginx/cache keys_zone=cache_zone:10m; |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
403 |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
404 map $request_method $purge_method { |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
405 PURGE 1; |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
406 default 0; |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
407 } |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
408 |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
409 server { |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
410 ... |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
411 location / { |
1185
f9c8336fe43c
Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents:
1155
diff
changeset
|
412 fastcgi_pass backend; |
f9c8336fe43c
Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents:
1155
diff
changeset
|
413 fastcgi_cache cache_zone; |
f9c8336fe43c
Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents:
1155
diff
changeset
|
414 fastcgi_cache_key $uri; |
1028
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
415 fastcgi_cache_purge $purge_method; |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
416 } |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
417 } |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
418 </example> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
419 <note> |
1128
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1088
diff
changeset
|
420 This functionality is available as part of our |
1594ed379f1f
De-i18n'ed <commercial_version/>.
Ruslan Ermilov <ru@nginx.com>
parents:
1088
diff
changeset
|
421 <commercial_version>commercial subscription</commercial_version>. |
1028
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
422 </note> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
423 </para> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
424 |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
425 </directive> |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
426 |
e582a10b1917
Documented the "proxy_cache_purge" and "fastcgi_cache_purge" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1015
diff
changeset
|
427 |
1011
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
428 <directive name="fastcgi_cache_revalidate"> |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
429 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
430 <default>off</default> |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
431 <context>http</context> |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
432 <context>server</context> |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
433 <context>location</context> |
1015
af77dd40abeb
Documented the appearance of "fastcgi_" and "proxy_cache_revalidate".
Vladimir Homutov <vl@nginx.com>
parents:
1011
diff
changeset
|
434 <appeared-in>1.5.7</appeared-in> |
1011
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
435 |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
436 <para> |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
437 Enables revalidation of expired cache items using conditional requests with |
1246
5be7716a5684
Documented If-None-Match in proxy_cache_revalidate and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1189
diff
changeset
|
438 the <header>If-Modified-Since</header> and <header>If-None-Match</header> |
5be7716a5684
Documented If-None-Match in proxy_cache_revalidate and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1189
diff
changeset
|
439 header fields. |
1011
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
440 </para> |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
441 |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
442 </directive> |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
443 |
2ad2f30efdf2
Documented the "fastcgi_" and "proxy_cache_revalidate" directives.
Vladimir Homutov <vl@nginx.com>
parents:
1005
diff
changeset
|
444 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
445 <directive name="fastcgi_cache_use_stale"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
446 <syntax> |
364 | 447 <literal>error</literal> | |
448 <literal>timeout</literal> | | |
449 <literal>invalid_header</literal> | | |
450 <literal>updating</literal> | | |
451 <literal>http_500</literal> | | |
452 <literal>http_503</literal> | | |
917
e26a18eb5ccd
Documented http_403 in proxy_next_upstream and friends.
Maxim Dounin <mdounin@mdounin.ru>
parents:
907
diff
changeset
|
453 <literal>http_403</literal> | |
364 | 454 <literal>http_404</literal> | |
455 <literal>off</literal> | |
456 ...</syntax> | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
457 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
458 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
459 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
460 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
461 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
462 <para> |
966 | 463 Determines in which cases a stale cached response can be used |
464 when an error occurs during communication with the FastCGI server. | |
465 The directive’s parameters match the parameters of the | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
466 <link id="fastcgi_next_upstream"/> directive. |
505
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
467 </para> |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
468 |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
469 <para> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
470 Additionally, the <literal>updating</literal> parameter permits |
966 | 471 using a stale cached response if it is currently being updated. |
472 This allows minimizing the number of accesses to FastCGI servers | |
505
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
473 when updating cached data. |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
474 </para> |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
475 |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
476 <para> |
509 | 477 To minimize the number of accesses to FastCGI servers when |
505
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
478 populating a new cache element, the <link id="fastcgi_cache_lock"/> |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
479 directive can be used. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
480 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
481 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
482 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
483 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
484 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
485 <directive name="fastcgi_cache_valid"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
486 <syntax>[<value>code</value> ...] <value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
487 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
488 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
489 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
490 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
491 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
492 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
493 Sets caching time for different response codes. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
494 For example, the following directives |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
495 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
496 fastcgi_cache_valid 200 302 10m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
497 fastcgi_cache_valid 404 1m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
498 </example> |
966 | 499 set 10 minutes of caching for responses with codes 200 and 302 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
500 and 1 minute for responses with code 404. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
501 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
502 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
503 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
504 If only caching <value>time</value> is specified |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
505 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
506 fastcgi_cache_valid 5m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
507 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
508 then only 200, 301, and 302 responses are cached. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
509 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
510 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
511 <para> |
966 | 512 In addition, the <literal>any</literal> parameter can be specified |
513 to cache any responses: | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
514 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
515 fastcgi_cache_valid 200 302 10m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
516 fastcgi_cache_valid 301 1h; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
517 fastcgi_cache_valid any 1m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
518 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
519 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
520 |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
521 <para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
522 Parameters of caching can also be set directly |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
523 in the response header. |
966 | 524 This has higher priority than setting of caching time using the directive. |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
525 The <header>X-Accel-Expires</header> header field sets caching time of a |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
526 response in seconds. |
966 | 527 The zero value disables caching for a response. |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
528 If the value starts with the <literal>@</literal> prefix, it sets an absolute |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
529 time in seconds since Epoch, up to which the response may be cached. |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
530 If the header does not include the <header>X-Accel-Expires</header> field, |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
531 parameters of caching may be set in the header fields |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
532 <header>Expires</header> or <header>Cache-Control</header>. |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
533 If the header includes the <header>Set-Cookie</header> field, such a |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
534 response will not be cached. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
535 Processing of one or more of these response header fields can be disabled |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
536 using the <link id="fastcgi_ignore_headers"/> directive. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
537 </para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
538 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
539 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
540 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
541 |
862
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
542 <directive name="fastcgi_catch_stderr"> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
543 <syntax><value>string</value></syntax> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
544 <default/> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
545 <context>http</context> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
546 <context>server</context> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
547 <context>location</context> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
548 |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
549 <para> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
550 Sets a string to search for in the error stream of a response |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
551 received from a FastCGI server. |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
552 If the <value>string</value> is found then it is considered that the FastCGI |
966 | 553 server has returned an <link id="fastcgi_next_upstream">invalid response</link>. |
554 This allows handling application errors in nginx, for example: | |
862
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
555 <example> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
556 location /php { |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
557 fastcgi_pass backend:9000; |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
558 ... |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
559 fastcgi_catch_stderr "PHP Fatal error"; |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
560 fastcgi_next_upstream error timeout invalid_header; |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
561 } |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
562 </example> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
563 </para> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
564 |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
565 </directive> |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
566 |
6a40b8e7219a
Documented the "fastcgi_catch_stderr" directive.
Homutov Vladimir <vl@nginx.com>
parents:
815
diff
changeset
|
567 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
568 <directive name="fastcgi_connect_timeout"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
569 <syntax><value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
570 <default>60s</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
571 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
572 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
573 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
574 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
575 <para> |
966 | 576 Defines a timeout for establishing a connection with a FastCGI server. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
577 It should be noted that this timeout cannot usually exceed 75 seconds. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
578 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
579 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
580 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
581 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
582 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
583 <directive name="fastcgi_hide_header"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
584 <syntax><value>field</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
585 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
586 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
587 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
588 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
589 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
590 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
591 By default, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
592 nginx does not pass the header fields <header>Status</header> and |
966 | 593 <header>X-Accel-...</header> from the response of a FastCGI |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
594 server to a client. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
595 The <literal>fastcgi_hide_header</literal> directive sets additional fields |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
596 that will not be passed. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
597 If, on the contrary, the passing of fields needs to be permitted, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
598 the <link id="fastcgi_pass_header"/> directive can be used. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
599 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
600 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
601 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
602 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
603 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
604 <directive name="fastcgi_ignore_client_abort"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
605 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
606 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
607 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
608 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
609 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
610 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
611 <para> |
966 | 612 Determines whether the connection with a FastCGI server should be |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
613 closed when a client closes the connection without waiting |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
614 for a response. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
615 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
616 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
617 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
618 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
619 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
620 <directive name="fastcgi_ignore_headers"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
621 <syntax><value>field</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
622 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
623 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
624 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
625 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
626 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
627 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
628 Disables processing of certain response header fields from the FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
629 The following fields can be ignored: <header>X-Accel-Redirect</header>, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
630 <header>X-Accel-Expires</header>, <header>X-Accel-Limit-Rate</header> (1.1.6), |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
631 <header>X-Accel-Buffering</header> (1.1.6), |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
632 <header>X-Accel-Charset</header> (1.1.6), <header>Expires</header>, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
633 <header>Cache-Control</header>, and <header>Set-Cookie</header> (0.8.44). |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
634 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
635 |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
636 <para> |
966 | 637 If not disabled, processing of these header fields has the following |
638 effect: | |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
639 <list type="bullet" compact="no"> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
640 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
641 <listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
642 <header>X-Accel-Expires</header>, <header>Expires</header>, |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
643 <header>Cache-Control</header>, and <header>Set-Cookie</header> |
966 | 644 set the parameters of response <link id="fastcgi_cache_valid">caching</link>; |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
645 </listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
646 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
647 <listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
648 <header>X-Accel-Redirect</header> performs an |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
649 <link doc="ngx_http_core_module.xml" id="internal">internal |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
650 redirect</link> to the specified URI; |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
651 </listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
652 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
653 <listitem> |
966 | 654 <header>X-Accel-Limit-Rate</header> sets the |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
655 <link doc="ngx_http_core_module.xml" id="limit_rate">rate |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
656 limit</link> for transmission of a response to a client; |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
657 </listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
658 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
659 <listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
660 <header>X-Accel-Buffering</header> enables or disables |
995
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
661 <link id="fastcgi_buffering">buffering</link> of a response; |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
662 </listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
663 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
664 <listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
665 <header>X-Accel-Charset</header> sets the desired |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
666 <link doc="ngx_http_charset_module.xml" id="charset"/> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
667 of a response. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
668 </listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
669 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
670 </list> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
671 </para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
672 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
673 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
674 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
675 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
676 <directive name="fastcgi_index"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
677 <syntax><value>name</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
678 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
679 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
680 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
681 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
682 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
683 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
684 Sets a file name that will be appended after a URI that ends with |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
685 a slash, in the value of the <var>$fastcgi_script_name</var> variable. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
686 For example, with these settings |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
687 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
688 fastcgi_index index.php; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
689 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
690 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
691 and the “<literal>/page.php</literal>” request, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
692 the <literal>SCRIPT_FILENAME</literal> parameter will be equal to |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
693 “<literal>/home/www/scripts/php/page.php</literal>”, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
694 and with the “<literal>/</literal>” request it will be equal to |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
695 “<literal>/home/www/scripts/php/index.php</literal>”. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
696 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
697 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
698 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
699 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
700 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
701 <directive name="fastcgi_intercept_errors"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
702 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
703 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
704 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
705 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
706 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
707 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
708 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
709 Determines whether FastCGI server responses with codes greater than or equal |
907
43887f41bb17
Corrected the descriptions of {proxy,fastcgi}_intercept_errors.
Ruslan Ermilov <ru@nginx.com>
parents:
862
diff
changeset
|
710 to 300 should be passed to a client or be redirected to nginx for processing |
966 | 711 with the <link doc="ngx_http_core_module.xml" id="error_page"/> directive. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
712 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
713 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
714 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
715 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
716 |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
717 <directive name="fastcgi_keep_conn"> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
718 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
719 <default>off</default> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
720 <context>http</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
721 <context>server</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
722 <context>location</context> |
498
65843513cff5
Documented that "fastcgi_keep_conn" appeared in 1.1.4.
Ruslan Ermilov <ru@nginx.com>
parents:
411
diff
changeset
|
723 <appeared-in>1.1.4</appeared-in> |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
724 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
725 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
726 By default, a FastCGI server will close a connection right after |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
727 sending the response. |
966 | 728 However, when this directive is set to the value <literal>on</literal>, |
729 nginx will instruct a FastCGI server to keep connections open. | |
730 This is necessary, in particular, for | |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
731 <link doc="ngx_http_upstream_module.xml" id="keepalive"/> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
732 connections to FastCGI servers to function. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
733 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
734 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
735 </directive> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
736 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
737 |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
738 <directive name="fastcgi_max_temp_file_size"> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
739 <syntax><value>size</value></syntax> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
740 <default>1024m</default> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
741 <context>http</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
742 <context>server</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
743 <context>location</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
744 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
745 <para> |
995
c5ccf511346a
Documented the "fastcgi_buffering" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
966
diff
changeset
|
746 When <link id="fastcgi_buffering">buffering</link> of responses from the FastCGI |
1153
4e20e4f8f49b
Finished truncation of "memory buffers" to just "buffers".
Ruslan Ermilov <ru@nginx.com>
parents:
1151
diff
changeset
|
747 server is enabled, and the whole response does not fit into the buffers |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
748 set by the <link id="fastcgi_buffer_size"/> and <link id="fastcgi_buffers"/> |
966 | 749 directives, a part of the response can be saved to a temporary file. |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
750 This directive sets the maximum <value>size</value> of the temporary file. |
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
751 The size of data written to the temporary file at a time is set |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
752 by the <link id="fastcgi_temp_file_write_size"/> directive. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
753 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
754 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
755 <para> |
966 | 756 The zero value disables buffering of responses to temporary files. |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
757 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
758 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
759 </directive> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
760 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
761 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
762 <directive name="fastcgi_next_upstream"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
763 <syntax> |
364 | 764 <literal>error</literal> | |
765 <literal>timeout</literal> | | |
766 <literal>invalid_header</literal> | | |
767 <literal>http_500</literal> | | |
768 <literal>http_503</literal> | | |
917
e26a18eb5ccd
Documented http_403 in proxy_next_upstream and friends.
Maxim Dounin <mdounin@mdounin.ru>
parents:
907
diff
changeset
|
769 <literal>http_403</literal> | |
364 | 770 <literal>http_404</literal> | |
771 <literal>off</literal> | |
772 ...</syntax> | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
773 <default>error timeout</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
774 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
775 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
776 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
777 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
778 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
779 Specifies in which cases a request should be passed to the next server: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
780 <list type="tag"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
781 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
782 <tag-name><literal>error</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
783 <tag-desc>an error occurred while establishing a connection with the |
966 | 784 server, passing a request to it, or reading the response header;</tag-desc> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
785 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
786 <tag-name><literal>timeout</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
787 <tag-desc>a timeout has occurred while establishing a connection with the |
966 | 788 server, passing a request to it, or reading the response header;</tag-desc> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
789 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
790 <tag-name><literal>invalid_header</literal></tag-name> |
966 | 791 <tag-desc>a server returned an empty or invalid response;</tag-desc> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
792 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
793 <tag-name><literal>http_500</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
794 <tag-desc>a server returned a response with the code 500;</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
795 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
796 <tag-name><literal>http_503</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
797 <tag-desc>a server returned a response with the code 503;</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
798 |
917
e26a18eb5ccd
Documented http_403 in proxy_next_upstream and friends.
Maxim Dounin <mdounin@mdounin.ru>
parents:
907
diff
changeset
|
799 <tag-name><literal>http_403</literal></tag-name> |
e26a18eb5ccd
Documented http_403 in proxy_next_upstream and friends.
Maxim Dounin <mdounin@mdounin.ru>
parents:
907
diff
changeset
|
800 <tag-desc>a server returned a response with the code 403;</tag-desc> |
e26a18eb5ccd
Documented http_403 in proxy_next_upstream and friends.
Maxim Dounin <mdounin@mdounin.ru>
parents:
907
diff
changeset
|
801 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
802 <tag-name><literal>http_404</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
803 <tag-desc>a server returned a response with the code 404;</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
804 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
805 <tag-name><literal>off</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
806 <tag-desc>disables passing a request to the next server.</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
807 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
808 </list> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
809 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
810 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
811 <para> |
966 | 812 One should bear in mind that passing a request to the next server is |
813 only possible if nothing has been sent to a client yet. | |
814 That is, if an error or timeout occurs in the middle of the | |
815 transferring of a response, fixing this is impossible. | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
816 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
817 |
942
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
818 <para> |
1289
57fc39924d42
Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1246
diff
changeset
|
819 The directive also defines what is considered an |
57fc39924d42
Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1246
diff
changeset
|
820 <link doc="ngx_http_upstream_module.xml" id="max_fails">unsuccessful |
57fc39924d42
Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1246
diff
changeset
|
821 attempt</link> of communication with a server. |
942
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
822 The cases of <literal>error</literal>, <literal>timeout</literal> and |
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
823 <literal>invalid_header</literal> are always considered unsuccessful attempts, |
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
824 even if they are not specified in the directive. |
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
825 The cases of <literal>http_500</literal> and <literal>http_503</literal> are |
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
826 considered unsuccessful attempts only if they are specified in the directive. |
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
827 The cases of <literal>http_403</literal> and <literal>http_404</literal> |
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
828 are never considered unsuccessful attempts. |
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
829 </para> |
ba3d6ade3513
Elaborate on upstream server failures.
Ruslan Ermilov <ru@nginx.com>
parents:
917
diff
changeset
|
830 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
831 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
832 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
833 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
834 <directive name="fastcgi_no_cache"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
835 <syntax><value>string</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
836 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
837 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
838 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
839 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
840 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
841 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
842 Defines conditions under which the response will not be saved to a cache. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
843 If at least one value of the string parameters is not empty and is not |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
844 equal to “0” then the response will not be saved: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
845 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
846 fastcgi_no_cache $cookie_nocache $arg_nocache$arg_comment; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
847 fastcgi_no_cache $http_pragma $http_authorization; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
848 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
849 Can be used along with the <link id="fastcgi_cache_bypass"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
850 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
851 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
852 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
853 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
854 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
855 <directive name="fastcgi_param"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
856 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
857 <value>parameter</value> <value>value</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
858 [<literal>if_not_empty</literal>]</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
859 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
860 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
861 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
862 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
863 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
864 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
865 Sets a <value>parameter</value> that should be passed to the FastCGI server. |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
866 The <value>value</value> can contain text, variables, and their combination. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
867 These directives are inherited from the previous level if and |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
868 only if there are no |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
869 <literal>fastcgi_param</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
870 directives defined on the current level. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
871 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
872 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
873 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
874 The following example shows the minimum required settings for PHP: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
875 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
876 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
877 fastcgi_param QUERY_STRING $query_string; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
878 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
879 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
880 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
881 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
882 The <literal>SCRIPT_FILENAME</literal> parameter is used in PHP for |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
883 determining the script name, and the <literal>QUERY_STRING</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
884 parameter is used to pass request parameters. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
885 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
886 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
887 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
888 For scripts that process <literal>POST</literal> requests, the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
889 following three parameters are also required: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
890 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
891 fastcgi_param REQUEST_METHOD $request_method; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
892 fastcgi_param CONTENT_TYPE $content_type; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
893 fastcgi_param CONTENT_LENGTH $content_length; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
894 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
895 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
896 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
897 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
898 If PHP was built with the <literal>--enable-force-cgi-redirect</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
899 configuration parameter, the <literal>REDIRECT_STATUS</literal> parameter |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
900 should also be passed with the value “200”: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
901 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
902 fastcgi_param REDIRECT_STATUS 200; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
903 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
904 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
905 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
906 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
907 If a directive is specified with <literal>if_not_empty</literal> (1.1.11) then |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
908 such a parameter will not be passed to the server until its value is not empty: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
909 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
910 fastcgi_param HTTPS $https if_not_empty; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
911 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
912 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
913 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
914 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
915 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
916 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
917 <directive name="fastcgi_pass"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
918 <syntax><value>address</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
919 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
920 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
921 <context>if in location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
922 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
923 <para> |
966 | 924 Sets the address of a FastCGI server. |
925 The address can be specified as a domain name or IP address, | |
926 and an optional port: | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
927 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
316
diff
changeset
|
928 fastcgi_pass localhost:9000; |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
929 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
930 or as a UNIX-domain socket path: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
931 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
316
diff
changeset
|
932 fastcgi_pass unix:/tmp/fastcgi.socket; |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
933 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
934 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
935 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
936 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
937 If a domain name resolves to several addresses, all of them will be |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
938 used in a round-robin fashion. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
939 In addition, an address can be specified as a |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
940 <link doc="ngx_http_upstream_module.xml">server group</link>. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
941 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
942 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
943 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
944 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
945 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
946 <directive name="fastcgi_pass_header"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
947 <syntax><value>field</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
948 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
949 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
950 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
951 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
952 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
953 <para> |
966 | 954 Permits passing <link id="fastcgi_hide_header">otherwise disabled</link> header |
955 fields from a FastCGI server to a client. | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
956 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
957 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
958 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
959 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
960 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
961 <directive name="fastcgi_read_timeout"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
962 <syntax><value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
963 <default>60s</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
964 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
965 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
966 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
967 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
968 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
969 Defines a timeout for reading a response from the FastCGI server. |
1149
1501e5848052
Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1146
diff
changeset
|
970 The timeout is set only between two successive read operations, |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
971 not for the transmission of the whole response. |
1149
1501e5848052
Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1146
diff
changeset
|
972 If the FastCGI server does not transmit anything within this time, |
1501e5848052
Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1146
diff
changeset
|
973 the connection is closed. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
974 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
975 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
976 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
977 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
978 |
793
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
979 <directive name="fastcgi_pass_request_body"> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
980 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
981 <default>on</default> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
982 <context>http</context> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
983 <context>server</context> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
984 <context>location</context> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
985 |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
986 <para> |
966 | 987 Indicates whether the original request body is passed |
793
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
988 to the FastCGI server. |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
989 See also the <link id="fastcgi_pass_request_headers"/> directive. |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
990 </para> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
991 |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
992 </directive> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
993 |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
994 |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
995 <directive name="fastcgi_pass_request_headers"> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
996 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
997 <default>on</default> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
998 <context>http</context> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
999 <context>server</context> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
1000 <context>location</context> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
1001 |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
1002 <para> |
966 | 1003 Indicates whether the header fields of the original request are passed |
1004 to the FastCGI server. | |
793
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
1005 See also the <link id="fastcgi_pass_request_body"/> directive. |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
1006 </para> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
1007 |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
1008 </directive> |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
1009 |
9104a921d940
Documented "fastcgi_pass_request_body/headers" directives.
Vladimir Homutov <vl@nginx.com>
parents:
773
diff
changeset
|
1010 |
773
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1011 <directive name="fastcgi_send_lowat"> |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1012 <syntax><value>size</value></syntax> |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1013 <default>0</default> |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1014 <context>http</context> |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1015 <context>server</context> |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1016 <context>location</context> |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1017 |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1018 <para> |
966 | 1019 If the directive is set to a non-zero value, nginx will try to |
1020 minimize the number | |
773
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1021 of send operations on outgoing connections to a FastCGI server by using either |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1022 <c-def>NOTE_LOWAT</c-def> flag of the |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1023 <link doc="../events.xml" id="kqueue"/> method, |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1024 or the <c-def>SO_SNDLOWAT</c-def> socket option, |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1025 with the specified <value>size</value>. |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1026 </para> |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1027 |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1028 <para> |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1029 This directive is ignored on Linux, Solaris, and Windows. |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1030 </para> |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1031 |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1032 </directive> |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1033 |
24b1b0101250
Documented "send_lowat" directive in fastcgi and proxy modules.
Vladimir Homutov <vl@nginx.com>
parents:
772
diff
changeset
|
1034 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1035 <directive name="fastcgi_send_timeout"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1036 <syntax><value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1037 <default>60s</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1038 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1039 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1040 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1041 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1042 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1043 Sets a timeout for transmitting a request to the FastCGI server. |
1149
1501e5848052
Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1146
diff
changeset
|
1044 The timeout is set only between two successive write operations, |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1045 not for the transmission of the whole request. |
1149
1501e5848052
Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1146
diff
changeset
|
1046 If the FastCGI server does not receive anything within this time, |
1501e5848052
Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1146
diff
changeset
|
1047 the connection is closed. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1048 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1049 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1050 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1051 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1052 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1053 <directive name="fastcgi_split_path_info"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1054 <syntax><value>regex</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1055 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1056 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1057 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1058 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1059 Defines a regular expression that captures a value for the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1060 <var>$fastcgi_path_info</var> variable. |
1149
1501e5848052
Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1146
diff
changeset
|
1061 The regular expression should have two captures: the first becomes |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1062 a value of the <var>$fastcgi_script_name</var> variable, the second |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1063 becomes a value of the <var>$fastcgi_path_info</var> variable. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1064 For example, with these settings |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1065 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1066 location ~ ^(.+\.php)(.*)$ { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1067 fastcgi_split_path_info ^(.+\.php)(.*)$; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1068 fastcgi_param SCRIPT_FILENAME /path/to/php$fastcgi_script_name; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1069 fastcgi_param PATH_INFO $fastcgi_path_info; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1070 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1071 and the “<literal>/show.php/article/0001</literal>” request, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1072 the <literal>SCRIPT_FILENAME</literal> parameter will be equal to |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1073 “<literal>/path/to/php/show.php</literal>”, and the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1074 <literal>PATH_INFO</literal> parameter will be equal to |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1075 “<literal>/article/0001</literal>”. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1076 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1077 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1078 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1079 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1080 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1081 <directive name="fastcgi_store"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1082 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1083 <literal>on</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1084 <literal>off</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1085 <value>string</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1086 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1087 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1088 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1089 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1090 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1091 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1092 Enables saving of files to a disk. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1093 The <literal>on</literal> parameter saves files with paths |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1094 corresponding to the directives |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1095 <link doc="ngx_http_core_module.xml" id="alias"/> or |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1096 <link doc="ngx_http_core_module.xml" id="root"/>. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1097 The <literal>off</literal> parameter disables saving of files. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1098 In addition, the file name can be set explicitly using the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1099 <value>string</value> with variables: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1100 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1101 fastcgi_store /data/www$original_uri; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1102 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1103 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1104 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1105 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1106 The modification time of files is set according to the received |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1107 <header>Last-Modified</header> response header field. |
1149
1501e5848052
Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1146
diff
changeset
|
1108 The response is first written to a temporary file, |
1501e5848052
Corrected the usage of the definite article.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1146
diff
changeset
|
1109 and then the file is renamed. |
966 | 1110 Starting from version 0.8.9, temporary files and the persistent store |
1111 can be put on different file systems. | |
1112 However, be aware that in this case a file is copied | |
1113 across two file systems instead of the cheap renaming operation. | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1114 It is thus recommended that for any given location both saved files and a |
966 | 1115 directory holding temporary files, set by the <link id="fastcgi_temp_path"/> |
1116 directive, are put on the same file system. | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1117 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1118 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1119 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1120 This directive can be used to create local copies of static unchangeable |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1121 files, e.g.: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1122 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1123 location /images/ { |
1005
2275611970dd
Removed open_file_cache_errors from proxy_store examples.
Maxim Dounin <mdounin@mdounin.ru>
parents:
995
diff
changeset
|
1124 root /data/www; |
2275611970dd
Removed open_file_cache_errors from proxy_store examples.
Maxim Dounin <mdounin@mdounin.ru>
parents:
995
diff
changeset
|
1125 error_page 404 = /fetch$uri; |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1126 } |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1127 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1128 location /fetch/ { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1129 internal; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1130 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1131 fastcgi_pass backend:9000; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1132 ... |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1133 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1134 fastcgi_store on; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1135 fastcgi_store_access user:rw group:rw all:r; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1136 fastcgi_temp_path /data/temp; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1137 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1138 alias /data/www/; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1139 } |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1140 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1141 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1142 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1143 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1144 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1145 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1146 <directive name="fastcgi_store_access"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1147 <syntax><value>users</value>:<value>permissions</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1148 <default>user:rw</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1149 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1150 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1151 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1152 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1153 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1154 Sets access permissions for newly created files and directories, e.g.: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1155 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1156 fastcgi_store_access user:rw group:rw all:r; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1157 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1158 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1159 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1160 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1161 If any <literal>group</literal> or <literal>all</literal> access permissions |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1162 are specified then <literal>user</literal> permissions may be omitted: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1163 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1164 fastcgi_store_access group:rw all:r; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1165 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1166 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1167 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1168 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1169 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1170 |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1171 <directive name="fastcgi_temp_file_write_size"> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1172 <syntax><value>size</value></syntax> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1173 <default>8k|16k</default> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1174 <context>http</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1175 <context>server</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1176 <context>location</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1177 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1178 <para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1179 Limits the <value>size</value> of data written to a temporary file |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1180 at a time, when buffering of responses from the FastCGI server |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1181 to temporary files is enabled. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1182 By default, <value>size</value> is limited by two buffers set by the |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1183 <link id="fastcgi_buffer_size"/> and <link id="fastcgi_buffers"/> directives. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1184 The maximum size of a temporary file is set by the |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1185 <link id="fastcgi_max_temp_file_size"/> directive. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1186 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1187 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1188 </directive> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1189 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1190 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1191 <directive name="fastcgi_temp_path"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1192 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1193 <value>path</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1194 [<value>level1</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1195 [<value>level2</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1196 [<value>level3</value>]]]</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1197 <default>fastcgi_temp</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1198 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1199 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1200 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1201 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1202 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1203 Defines a directory for storing temporary files |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1204 with data received from FastCGI servers. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1205 Up to three-level subdirectory hierarchy can be used underneath the specified |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1206 directory. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1207 For example, in the following configuration |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1208 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1209 fastcgi_temp_path /spool/nginx/fastcgi_temp 1 2; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1210 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1211 a temporary file might look like this: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1212 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1213 /spool/nginx/fastcgi_temp/<emphasis>7</emphasis>/<emphasis>45</emphasis>/00000123<emphasis>457</emphasis> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1214 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1215 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1216 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1217 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1218 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1219 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1220 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1221 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1222 <section id="parameters" name="Parameters Passed to a FastCGI Server"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1223 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1224 <para> |
1151
4c2324a7eeea
Corrected the usage of articles and a comma.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1149
diff
changeset
|
1225 HTTP request header fields are passed to a FastCGI server as parameters. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1226 In applications and scripts running as FastCGI servers, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1227 these parameters are usually made available as environment variables. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1228 For example, the <header>User-Agent</header> header field is passed as the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1229 <literal>HTTP_USER_AGENT</literal> parameter. |
966 | 1230 In addition to HTTP request header fields, it is possible to pass arbitrary |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1231 parameters using the <link id="fastcgi_param"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1232 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1233 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1234 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1235 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1236 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1237 <section id="variables" name="Embedded Variables"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1238 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1239 <para> |
364 | 1240 The <literal>ngx_http_fastcgi_module</literal> module supports embedded |
1241 variables that can be used to set parameters using the | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1242 <link id="fastcgi_param"/> directive: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1243 <list type="tag"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1244 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1153
diff
changeset
|
1245 <tag-name id="var_fastcgi_script_name"><var>$fastcgi_script_name</var> |
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1153
diff
changeset
|
1246 </tag-name> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1247 <tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1248 request URI or, if a URI ends with a slash, request URI with an index file |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1249 name configured by the <link id="fastcgi_index"/> directive appended to it. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1250 This variable can be used to set the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1251 <literal>SCRIPT_FILENAME</literal> and <literal>PATH_TRANSLATED</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1252 parameters that determine the script name in PHP. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1253 For example, for the “<literal>/info/</literal>” request with the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1254 following directives |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1255 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1256 fastcgi_index index.php; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1257 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1258 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1259 the <literal>SCRIPT_FILENAME</literal> parameter will be equal to |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1260 “<literal>/home/www/scripts/php/info/index.php</literal>”. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1261 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1262 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1263 When using the <link id="fastcgi_split_path_info"/> directive, |
966 | 1264 the <var>$fastcgi_script_name</var> variable equals the value of |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1265 the first capture set by the directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1266 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1267 </tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1268 |
1155
07402a11fd8d
Assigned IDs to tags describing variables.
Vladimir Homutov <vl@nginx.com>
parents:
1153
diff
changeset
|
1269 <tag-name id="var_fastcgi_path_info"><var>$fastcgi_path_info</var></tag-name> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1270 <tag-desc>the value of the second capture set by the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1271 <link id="fastcgi_split_path_info"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1272 This variable can be used to set the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1273 <literal>PATH_INFO</literal> parameter. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1274 </tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1275 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1276 </list> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1277 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1278 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1279 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1280 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1281 </module> |