Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_scgi_module.xml @ 1991:4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Fri, 26 May 2017 18:58:03 +0300 |
parents | 3460bd328287 |
children | fc3ba2e76974 |
rev | line source |
---|---|
1180 | 1 <?xml version="1.0"?> |
2 | |
3 <!-- | |
4 Copyright (C) Igor Sysoev | |
5 Copyright (C) Nginx, Inc. | |
6 --> | |
7 | |
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | |
9 | |
10 <module name="Module ngx_http_scgi_module" | |
11 link="/en/docs/http/ngx_http_scgi_module.html" | |
12 lang="en" | |
1991
4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
Ruslan Ermilov <ru@nginx.com>
parents:
1973
diff
changeset
|
13 rev="36"> |
1180 | 14 |
15 <section id="summary"> | |
16 | |
17 <para> | |
18 The <literal>ngx_http_scgi_module</literal> module allows passing | |
19 requests to an SCGI server. | |
20 </para> | |
21 | |
22 </section> | |
23 | |
24 | |
25 <section id="example" name="Example Configuration"> | |
26 | |
27 <para> | |
28 <example> | |
29 location / { | |
30 include scgi_params; | |
31 scgi_pass localhost:9000; | |
32 } | |
33 </example> | |
34 </para> | |
35 | |
36 </section> | |
37 | |
38 | |
39 <section id="directives" name="Directives"> | |
40 | |
41 <directive name="scgi_bind"> | |
1885
6839c258c473
Added <literal> tag to proxy bind transparent.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1838
diff
changeset
|
42 <syntax> |
6839c258c473
Added <literal> tag to proxy bind transparent.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1838
diff
changeset
|
43 <value>address</value> |
6839c258c473
Added <literal> tag to proxy bind transparent.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1838
diff
changeset
|
44 [<literal>transparent</literal>] | |
6839c258c473
Added <literal> tag to proxy bind transparent.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1838
diff
changeset
|
45 <literal>off</literal></syntax> |
1180 | 46 <default/> |
47 <context>http</context> | |
48 <context>server</context> | |
49 <context>location</context> | |
50 | |
51 <para> | |
52 Makes outgoing connections to an SCGI server originate | |
1748
be371be7a5c8
Documented optional port for proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1731
diff
changeset
|
53 from the specified local IP address with an optional port (1.11.2). |
1180 | 54 Parameter value can contain variables (1.3.12). |
55 The special value <literal>off</literal> (1.3.12) cancels the effect | |
56 of the <literal>scgi_bind</literal> directive | |
57 inherited from the previous configuration level, which allows the | |
1748
be371be7a5c8
Documented optional port for proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1731
diff
changeset
|
58 system to auto-assign the local IP address and port. |
1180 | 59 </para> |
60 | |
1696
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
61 <para id="scgi_bind_transparent"> |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
62 The <literal>transparent</literal> parameter (1.11.0) allows |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
63 outgoing connections to an SCGI server originate |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
64 from a non-local IP address, |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
65 for example, from a real IP address of a client: |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
66 <example> |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
67 scgi_bind $remote_addr transparent; |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
68 </example> |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
69 In order for this parameter to work, |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
70 it is necessary to run nginx worker processes with the |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
71 <link doc="../ngx_core_module.xml" id="user">superuser</link> privileges |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
72 and configure kernel routing table |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
73 to intercept network traffic from the SCGI server. |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
74 </para> |
d855e7cc3b2f
Added the "transparent" parameter of proxy_bind and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1672
diff
changeset
|
75 |
1180 | 76 </directive> |
77 | |
78 | |
79 <directive name="scgi_buffer_size"> | |
80 <syntax><value>size</value></syntax> | |
81 <default>4k|8k</default> | |
82 <context>http</context> | |
83 <context>server</context> | |
84 <context>location</context> | |
85 | |
86 <para> | |
87 Sets the <value>size</value> of the buffer used for reading the first part | |
88 of the response received from the SCGI server. | |
89 This part usually contains a small response header. | |
1550
305f2c338181
Fixed description of default value of proxy_buffer_size and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1542
diff
changeset
|
90 By default, the buffer size is equal to one memory page. |
305f2c338181
Fixed description of default value of proxy_buffer_size and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1542
diff
changeset
|
91 This is either 4K or 8K, depending on a platform. |
1180 | 92 It can be made smaller, however. |
93 </para> | |
94 | |
95 </directive> | |
96 | |
97 | |
98 <directive name="scgi_buffering"> | |
99 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
100 <default>on</default> | |
101 <context>http</context> | |
102 <context>server</context> | |
103 <context>location</context> | |
104 | |
105 <para> | |
106 Enables or disables buffering of responses from the SCGI server. | |
107 </para> | |
108 | |
109 <para> | |
110 When buffering is enabled, nginx receives a response from the SCGI server | |
111 as soon as possible, saving it into the buffers set by the | |
112 <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> directives. | |
113 If the whole response does not fit into memory, a part of it can be saved | |
114 to a <link id="scgi_temp_path">temporary file</link> on the disk. | |
115 Writing to temporary files is controlled by the | |
116 <link id="scgi_max_temp_file_size"/> and | |
117 <link id="scgi_temp_file_write_size"/> directives. | |
118 </para> | |
119 | |
120 <para> | |
121 When buffering is disabled, the response is passed to a client synchronously, | |
122 immediately as it is received. | |
123 nginx will not try to read the whole response from the SCGI server. | |
124 The maximum size of the data that nginx can receive from the server | |
125 at a time is set by the <link id="scgi_buffer_size"/> directive. | |
126 </para> | |
127 | |
128 <para> | |
129 Buffering can also be enabled or disabled by passing | |
130 “<literal>yes</literal>” or “<literal>no</literal>” in the | |
131 <header>X-Accel-Buffering</header> response header field. | |
132 This capability can be disabled using the | |
133 <link id="scgi_ignore_headers"/> directive. | |
134 </para> | |
135 | |
136 </directive> | |
137 | |
138 | |
139 <directive name="scgi_buffers"> | |
140 <syntax><value>number</value> <value>size</value></syntax> | |
141 <default>8 4k|8k</default> | |
142 <context>http</context> | |
143 <context>server</context> | |
144 <context>location</context> | |
145 | |
146 <para> | |
147 Sets the <value>number</value> and <value>size</value> of the | |
148 buffers used for reading a response from the SCGI server, | |
149 for a single connection. | |
150 By default, the buffer size is equal to one memory page. | |
151 This is either 4K or 8K, depending on a platform. | |
152 </para> | |
153 | |
154 </directive> | |
155 | |
156 | |
157 <directive name="scgi_busy_buffers_size"> | |
158 <syntax><value>size</value></syntax> | |
159 <default>8k|16k</default> | |
160 <context>http</context> | |
161 <context>server</context> | |
162 <context>location</context> | |
163 | |
164 <para> | |
165 When <link id="scgi_buffering">buffering</link> of responses from the SCGI | |
166 server is enabled, limits the total <value>size</value> of buffers that | |
167 can be busy sending a response to the client while the response is not | |
168 yet fully read. | |
169 In the meantime, the rest of the buffers can be used for reading the response | |
170 and, if needed, buffering part of the response to a temporary file. | |
171 By default, <value>size</value> is limited by the size of two buffers set by the | |
172 <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> directives. | |
173 </para> | |
174 | |
175 </directive> | |
176 | |
177 | |
178 <directive name="scgi_cache"> | |
179 <syntax><value>zone</value> | <literal>off</literal></syntax> | |
180 <default>off</default> | |
181 <context>http</context> | |
182 <context>server</context> | |
183 <context>location</context> | |
184 | |
185 <para> | |
186 Defines a shared memory zone used for caching. | |
187 The same zone can be used in several places. | |
1382
94cac978bda3
Documented variables support in proxy_cache and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1379
diff
changeset
|
188 Parameter value can contain variables (1.7.9). |
1180 | 189 The <literal>off</literal> parameter disables caching inherited |
190 from the previous configuration level. | |
191 </para> | |
192 | |
193 </directive> | |
194 | |
195 | |
1909
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
196 <directive name="scgi_cache_background_update"> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
197 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
198 <default>off</default> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
199 <context>http</context> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
200 <context>server</context> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
201 <context>location</context> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
202 <appeared-in>1.11.10</appeared-in> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
203 |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
204 <para> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
205 Allows starting a background subrequest |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
206 to update an expired cache item, |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
207 while a stale cached response is returned to the client. |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
208 Note that it is necessary to |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
209 <link id="scgi_cache_use_stale_updating">allow</link> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
210 the usage of a stale cached response when it is being updated. |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
211 </para> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
212 |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
213 </directive> |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
214 |
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
215 |
1180 | 216 <directive name="scgi_cache_bypass"> |
217 <syntax><value>string</value> ...</syntax> | |
218 <default/> | |
219 <context>http</context> | |
220 <context>server</context> | |
221 <context>location</context> | |
222 | |
223 <para> | |
224 Defines conditions under which the response will not be taken from a cache. | |
225 If at least one value of the string parameters is not empty and is not | |
226 equal to “0” then the response will not be taken from the cache: | |
227 <example> | |
228 scgi_cache_bypass $cookie_nocache $arg_nocache$arg_comment; | |
229 scgi_cache_bypass $http_pragma $http_authorization; | |
230 </example> | |
231 Can be used along with the <link id="scgi_no_cache"/> directive. | |
232 </para> | |
233 | |
234 </directive> | |
235 | |
236 | |
237 <directive name="scgi_cache_key"> | |
238 <syntax><value>string</value></syntax> | |
239 <default/> | |
240 <context>http</context> | |
241 <context>server</context> | |
242 <context>location</context> | |
243 | |
244 <para> | |
245 Defines a key for caching, for example | |
246 <example> | |
247 scgi_cache_key localhost:9000$request_uri; | |
248 </example> | |
249 </para> | |
250 | |
251 </directive> | |
252 | |
253 | |
254 <directive name="scgi_cache_lock"> | |
255 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
256 <default>off</default> | |
257 <context>http</context> | |
258 <context>server</context> | |
259 <context>location</context> | |
260 <appeared-in>1.1.12</appeared-in> | |
261 | |
262 <para> | |
263 When enabled, only one request at a time will be allowed to populate | |
264 a new cache element identified according to the <link id="scgi_cache_key"/> | |
265 directive by passing a request to an SCGI server. | |
266 Other requests of the same cache element will either wait | |
267 for a response to appear in the cache or the cache lock for | |
268 this element to be released, up to the time set by the | |
269 <link id="scgi_cache_lock_timeout"/> directive. | |
270 </para> | |
271 | |
272 </directive> | |
273 | |
274 | |
1379
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
275 <directive name="scgi_cache_lock_age"> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
276 <syntax><value>time</value></syntax> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
277 <default>5s</default> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
278 <context>http</context> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
279 <context>server</context> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
280 <context>location</context> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
281 <appeared-in>1.7.8</appeared-in> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
282 |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
283 <para> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
284 If the last request passed to the SCGI server |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
285 for populating a new cache element |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
286 has not completed for the specified <value>time</value>, |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
287 one more request may be passed to the SCGI server. |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
288 </para> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
289 |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
290 </directive> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
291 |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
292 |
1180 | 293 <directive name="scgi_cache_lock_timeout"> |
294 <syntax><value>time</value></syntax> | |
295 <default>5s</default> | |
296 <context>http</context> | |
297 <context>server</context> | |
298 <context>location</context> | |
299 <appeared-in>1.1.12</appeared-in> | |
300 | |
301 <para> | |
302 Sets a timeout for <link id="scgi_cache_lock"/>. | |
1379
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
303 When the <value>time</value> expires, |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
304 the request will be passed to the SCGI server, |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
305 however, the response will not be cached. |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
306 <note> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
307 Before 1.7.8, the response could be cached. |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
308 </note> |
1180 | 309 </para> |
310 | |
311 </directive> | |
312 | |
313 | |
1838
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
314 <directive name="scgi_cache_max_range_offset"> |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
315 <syntax><value>number</value></syntax> |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
316 <default/> |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
317 <context>http</context> |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
318 <context>server</context> |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
319 <context>location</context> |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
320 <appeared-in>1.11.6</appeared-in> |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
321 |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
322 <para> |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
323 Sets an offset in bytes for byte-range requests. |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
324 If the range is beyond the offset, |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
325 the range request will be passed to the SCGI server |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
326 and the response will not be cached. |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
327 </para> |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
328 |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
329 </directive> |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
330 |
0d6ac4838921
Documented proxy_cache_max_range_offset and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1812
diff
changeset
|
331 |
1180 | 332 <directive name="scgi_cache_methods"> |
333 <syntax> | |
334 <literal>GET</literal> | | |
335 <literal>HEAD</literal> | | |
336 <literal>POST</literal> | |
337 ...</syntax> | |
338 <default>GET HEAD</default> | |
339 <context>http</context> | |
340 <context>server</context> | |
341 <context>location</context> | |
342 | |
343 <para> | |
344 If the client request method is listed in this directive then | |
345 the response will be cached. | |
346 “<literal>GET</literal>” and “<literal>HEAD</literal>” methods are always | |
347 added to the list, though it is recommended to specify them explicitly. | |
348 See also the <link id="scgi_no_cache"/> directive. | |
349 </para> | |
350 | |
351 </directive> | |
352 | |
353 | |
354 <directive name="scgi_cache_min_uses"> | |
355 <syntax><value>number</value></syntax> | |
356 <default>1</default> | |
357 <context>http</context> | |
358 <context>server</context> | |
359 <context>location</context> | |
360 | |
361 <para> | |
362 Sets the <value>number</value> of requests after which the response | |
363 will be cached. | |
364 </para> | |
365 | |
366 </directive> | |
367 | |
368 | |
369 <directive name="scgi_cache_path"> | |
370 <syntax> | |
371 <value>path</value> | |
372 [<literal>levels</literal>=<value>levels</value>] | |
1384
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
373 [<literal>use_temp_path</literal>=<literal>on</literal>|<literal>off</literal>] |
1180 | 374 <literal>keys_zone</literal>=<value>name</value>:<value>size</value> |
375 [<literal>inactive</literal>=<value>time</value>] | |
376 [<literal>max_size</literal>=<value>size</value>] | |
1810
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
377 [<literal>manager_files</literal>=<value>number</value>] |
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
378 [<literal>manager_sleep</literal>=<value>time</value>] |
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
379 [<literal>manager_threshold</literal>=<value>time</value>] |
1180 | 380 [<literal>loader_files</literal>=<value>number</value>] |
381 [<literal>loader_sleep</literal>=<value>time</value>] | |
1582
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
382 [<literal>loader_threshold</literal>=<value>time</value>] |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
383 [<literal>purger</literal>=<literal>on</literal>|<literal>off</literal>] |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
384 [<literal>purger_files</literal>=<value>number</value>] |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
385 [<literal>purger_sleep</literal>=<value>time</value>] |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
386 [<literal>purger_threshold</literal>=<value>time</value>]</syntax> |
1180 | 387 <default/> |
388 <context>http</context> | |
389 | |
390 <para> | |
391 Sets the path and other parameters of a cache. | |
392 Cache data are stored in files. | |
1190
dd4cfc6ce770
Corrected description of *_cache_path file names.
Ruslan Ermilov <ru@nginx.com>
parents:
1189
diff
changeset
|
393 The file name in a cache is a result of |
dd4cfc6ce770
Corrected description of *_cache_path file names.
Ruslan Ermilov <ru@nginx.com>
parents:
1189
diff
changeset
|
394 applying the MD5 function to the |
dd4cfc6ce770
Corrected description of *_cache_path file names.
Ruslan Ermilov <ru@nginx.com>
parents:
1189
diff
changeset
|
395 <link id="scgi_cache_key">cache key</link>. |
1796
1d576e8d6ead
Clarified the "levels" parameter of proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1748
diff
changeset
|
396 The <literal>levels</literal> parameter defines hierarchy levels of a cache: |
1d576e8d6ead
Clarified the "levels" parameter of proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1748
diff
changeset
|
397 from 1 to 3, each level accepts values 1 or 2. |
1180 | 398 For example, in the following configuration |
399 <example> | |
400 scgi_cache_path /data/nginx/cache levels=1:2 keys_zone=one:10m; | |
401 </example> | |
402 file names in a cache will look like this: | |
403 <example> | |
404 /data/nginx/cache/<emphasis>c</emphasis>/<emphasis>29</emphasis>/b7f54b2df7773722d382f4809d650<emphasis>29c</emphasis> | |
405 </example> | |
406 </para> | |
407 | |
408 <para> | |
409 A cached response is first written to a temporary file, | |
410 and then the file is renamed. | |
411 Starting from version 0.8.9, temporary files and the cache can be put on | |
412 different file systems. | |
413 However, be aware that in this case a file is copied | |
414 across two file systems instead of the cheap renaming operation. | |
415 It is thus recommended that for any given location both cache and a directory | |
1384
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
416 holding temporary files |
1180 | 417 are put on the same file system. |
1384
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
418 A directory for temporary files is set based on |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
419 the <literal>use_temp_path</literal> parameter (1.7.10). |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
420 If this parameter is omitted or set to the value <literal>on</literal>, |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
421 the directory set by the <link id="scgi_temp_path"/> directive |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
422 for the given location will be used. |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
423 If the value is set to <literal>off</literal>, |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
424 temporary files will be put directly in the cache directory. |
1180 | 425 </para> |
426 | |
427 <para> | |
428 In addition, all active keys and information about data are stored | |
429 in a shared memory zone, whose <value>name</value> and <value>size</value> | |
430 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
|
431 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
|
432 </para> |
f25d00109de0
Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1185
diff
changeset
|
433 |
f25d00109de0
Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1185
diff
changeset
|
434 <para> |
1180 | 435 Cached data that are not accessed during the time specified by the |
436 <literal>inactive</literal> parameter get removed from the cache | |
437 regardless of their freshness. | |
438 By default, <literal>inactive</literal> is set to 10 minutes. | |
439 </para> | |
440 | |
441 <para> | |
442 The special “cache manager” process monitors the maximum cache size set | |
443 by the <literal>max_size</literal> parameter. | |
444 When this size is exceeded, it removes the least recently used data. | |
1810
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
445 The data is removed in iterations configured by |
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
446 <literal>manager_files</literal>, |
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
447 <literal>manager_threshold</literal>, and |
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
448 <literal>manager_sleep</literal> parameters (1.11.5). |
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
449 During one iteration no more than <literal>manager_files</literal> items |
1812
35ec213c16cf
Removed extraneous whitespace.
Ruslan Ermilov <ru@nginx.com>
parents:
1810
diff
changeset
|
450 are deleted (by default, 100). |
1810
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
451 The duration of one iteration is limited by the |
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
452 <literal>manager_threshold</literal> parameter (by default, 200 milliseconds). |
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
453 Between iterations, a pause configured by the <literal>manager_sleep</literal> |
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
454 parameter (by default, 50 milliseconds) is made. |
1180 | 455 </para> |
456 | |
457 <para> | |
458 A minute after the start the special “cache loader” process is activated. | |
459 It loads information about previously cached data stored on file system | |
460 into a cache zone. | |
1810
bc6341aaa832
Added cache manager parameters to proxy_cache path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1803
diff
changeset
|
461 The loading is also done in iterations. |
1180 | 462 During one iteration no more than <literal>loader_files</literal> items |
463 are loaded (by default, 100). | |
464 Besides, the duration of one iteration is limited by the | |
465 <literal>loader_threshold</literal> parameter (by default, 200 milliseconds). | |
466 Between iterations, a pause configured by the <literal>loader_sleep</literal> | |
467 parameter (by default, 50 milliseconds) is made. | |
468 </para> | |
469 | |
1582
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
470 <para> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
471 Additionally, |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
472 the following parameters are available as part of our |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
473 <commercial_version>commercial subscription</commercial_version>: |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
474 </para> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
475 |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
476 <para> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
477 <list type="tag"> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
478 |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
479 <tag-name id="purger"> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
480 <literal>purger</literal>=<literal>on</literal>|<literal>off</literal> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
481 </tag-name> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
482 <tag-desc> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
483 Instructs whether cache entries that match a |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
484 <link id="scgi_cache_purge">wildcard key</link> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
485 will be removed from the disk by the cache purger (1.7.12). |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
486 Setting the parameter to <literal>on</literal> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
487 (default is <literal>off</literal>) |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
488 will activate the “cache purger” process that |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
489 permanently iterates through all cache entries |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
490 and deletes the entries that match the wildcard key. |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
491 </tag-desc> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
492 |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
493 <tag-name id="purger_files"> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
494 <literal>purger_files</literal>=<value>number</value> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
495 </tag-name> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
496 <tag-desc> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
497 Sets the number of items that will be scanned during one iteration (1.7.12). |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
498 By default, <literal>purger_files</literal> is set to 10. |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
499 </tag-desc> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
500 |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
501 <tag-name id="purger_threshold"> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
502 <literal>purger_threshold</literal>=<value>number</value> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
503 </tag-name> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
504 <tag-desc> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
505 Sets the duration of one iteration (1.7.12). |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
506 By default, <literal>purger_threshold</literal> is set to 50 milliseconds. |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
507 </tag-desc> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
508 |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
509 <tag-name id="purger_sleep"> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
510 <literal>purger_sleep</literal>=<value>number</value> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
511 </tag-name> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
512 <tag-desc> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
513 Sets a pause between iterations (1.7.12). |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
514 By default, <literal>purger_sleep</literal> is set to 50 milliseconds. |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
515 </tag-desc> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
516 |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
517 </list> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
518 </para> |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
519 |
1973
3460bd328287
Documented cache version change in proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1956
diff
changeset
|
520 <para> |
3460bd328287
Documented cache version change in proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1956
diff
changeset
|
521 <note> |
3460bd328287
Documented cache version change in proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1956
diff
changeset
|
522 In versions 1.7.3, 1.7.7, and 1.11.10 cache header format has been changed. |
3460bd328287
Documented cache version change in proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1956
diff
changeset
|
523 Previously cached responses will be considered invalid |
3460bd328287
Documented cache version change in proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1956
diff
changeset
|
524 after upgrading to a newer nginx version. |
3460bd328287
Documented cache version change in proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1956
diff
changeset
|
525 </note> |
3460bd328287
Documented cache version change in proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1956
diff
changeset
|
526 </para> |
3460bd328287
Documented cache version change in proxy_cache_path and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1956
diff
changeset
|
527 |
1180 | 528 </directive> |
529 | |
530 | |
531 <directive name="scgi_cache_purge"> | |
532 <syntax>string ...</syntax> | |
533 <default/> | |
534 <context>http</context> | |
535 <context>server</context> | |
536 <context>location</context> | |
537 <appeared-in>1.5.7</appeared-in> | |
538 | |
539 <para> | |
540 Defines conditions under which the request will be considered a cache | |
541 purge request. | |
542 If at least one value of the string parameters is not empty and is not equal | |
543 to “0” then the cache entry with a corresponding | |
544 <link id="scgi_cache_key">cache key</link> is removed. | |
545 The result of successful operation is indicated by returning | |
546 the <http-status code="204" text="No Content"/> response. | |
547 </para> | |
548 | |
549 <para> | |
550 If the <link id="scgi_cache_key">cache key</link> of a purge request ends | |
551 with an asterisk (“<literal>*</literal>”), all cache entries matching the | |
552 wildcard key will be removed from the cache. | |
1582
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
553 However, these entries will remain on the disk until they are deleted |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
554 for either <link id="scgi_cache_path">inactivity</link>, |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
555 or processed by the <link id="purger">cache purger</link> (1.7.12), |
8973c7b37854
Updated commercial docs.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1550
diff
changeset
|
556 or a client attempts to access them. |
1180 | 557 </para> |
558 | |
559 <para> | |
560 Example configuration: | |
561 <example> | |
562 scgi_cache_path /data/nginx/cache keys_zone=cache_zone:10m; | |
563 | |
564 map $request_method $purge_method { | |
565 PURGE 1; | |
566 default 0; | |
567 } | |
568 | |
569 server { | |
570 ... | |
571 location / { | |
1185
f9c8336fe43c
Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents:
1184
diff
changeset
|
572 scgi_pass backend; |
f9c8336fe43c
Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents:
1184
diff
changeset
|
573 scgi_cache cache_zone; |
f9c8336fe43c
Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents:
1184
diff
changeset
|
574 scgi_cache_key $uri; |
1180 | 575 scgi_cache_purge $purge_method; |
576 } | |
577 } | |
578 </example> | |
579 <note> | |
580 This functionality is available as part of our | |
581 <commercial_version>commercial subscription</commercial_version>. | |
582 </note> | |
583 </para> | |
584 | |
585 </directive> | |
586 | |
587 | |
588 <directive name="scgi_cache_revalidate"> | |
589 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
590 <default>off</default> | |
591 <context>http</context> | |
592 <context>server</context> | |
593 <context>location</context> | |
594 <appeared-in>1.5.7</appeared-in> | |
595 | |
596 <para> | |
597 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:
1190
diff
changeset
|
598 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:
1190
diff
changeset
|
599 header fields. |
1180 | 600 </para> |
601 | |
602 </directive> | |
603 | |
604 | |
605 <directive name="scgi_cache_use_stale"> | |
606 <syntax> | |
607 <literal>error</literal> | | |
608 <literal>timeout</literal> | | |
609 <literal>invalid_header</literal> | | |
610 <literal>updating</literal> | | |
611 <literal>http_500</literal> | | |
612 <literal>http_503</literal> | | |
613 <literal>http_403</literal> | | |
614 <literal>http_404</literal> | | |
1956
dd96a09dd4f7
Documented support for "429 Too Many Requests" response.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1923
diff
changeset
|
615 <literal>http_429</literal> | |
1180 | 616 <literal>off</literal> |
617 ...</syntax> | |
618 <default>off</default> | |
619 <context>http</context> | |
620 <context>server</context> | |
621 <context>location</context> | |
622 | |
623 <para> | |
624 Determines in which cases a stale cached response can be used | |
625 when an error occurs during communication with the SCGI server. | |
626 The directive’s parameters match the parameters of the | |
627 <link id="scgi_next_upstream"/> directive. | |
628 </para> | |
629 | |
630 <para> | |
1542
a13a99cf46ea
Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents:
1524
diff
changeset
|
631 The <literal>error</literal> parameter also permits |
a13a99cf46ea
Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents:
1524
diff
changeset
|
632 using a stale cached response if an SCGI server to process a request |
a13a99cf46ea
Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents:
1524
diff
changeset
|
633 cannot be selected. |
a13a99cf46ea
Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents:
1524
diff
changeset
|
634 </para> |
a13a99cf46ea
Better documented "*_cache_use_stale error".
Ruslan Ermilov <ru@nginx.com>
parents:
1524
diff
changeset
|
635 |
1909
399d0e188195
Documented proxy_cache_background_update and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1885
diff
changeset
|
636 <para id="scgi_cache_use_stale_updating"> |
1180 | 637 Additionally, the <literal>updating</literal> parameter permits |
638 using a stale cached response if it is currently being updated. | |
639 This allows minimizing the number of accesses to SCGI servers | |
640 when updating cached data. | |
1912
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
641 </para> |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
642 |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
643 <para> |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
644 Using a stale cached response |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
645 can also be enabled directly in the response header |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
646 for a specified number of seconds after the response became stale (1.11.10). |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
647 This has lower priority than using the directive parameters. |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
648 <list type="bullet" compact="no"> |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
649 |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
650 <listitem> |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
651 The |
1910
41cf2c2d8c5c
Cache: support for stale-while-revalidate and stale-if-error.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1909
diff
changeset
|
652 “<link url="https://tools.ietf.org/html/rfc5861#section-3">stale-while-revalidate</link>” |
1912
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
653 extension of the <header>Cache-Control</header> header field permits |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
654 using a stale cached response if it is currently being updated. |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
655 </listitem> |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
656 |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
657 <listitem> |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
658 The |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
659 “<link url="https://tools.ietf.org/html/rfc5861#section-4">stale-if-error</link>” |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
660 extension of the <header>Cache-Control</header> header field permits |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
661 using a stale cached response in case of an error. |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
662 </listitem> |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
663 |
ec4af97e4403
Split off header options from parameters in proxy_cache_use_stale and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1910
diff
changeset
|
664 </list> |
1180 | 665 </para> |
666 | |
667 <para> | |
668 To minimize the number of accesses to SCGI servers when | |
669 populating a new cache element, the <link id="scgi_cache_lock"/> | |
670 directive can be used. | |
671 </para> | |
672 | |
673 </directive> | |
674 | |
675 | |
676 <directive name="scgi_cache_valid"> | |
677 <syntax>[<value>code</value> ...] <value>time</value></syntax> | |
678 <default/> | |
679 <context>http</context> | |
680 <context>server</context> | |
681 <context>location</context> | |
682 | |
683 <para> | |
684 Sets caching time for different response codes. | |
685 For example, the following directives | |
686 <example> | |
687 scgi_cache_valid 200 302 10m; | |
688 scgi_cache_valid 404 1m; | |
689 </example> | |
690 set 10 minutes of caching for responses with codes 200 and 302 | |
691 and 1 minute for responses with code 404. | |
692 </para> | |
693 | |
694 <para> | |
695 If only caching <value>time</value> is specified | |
696 <example> | |
697 scgi_cache_valid 5m; | |
698 </example> | |
699 then only 200, 301, and 302 responses are cached. | |
700 </para> | |
701 | |
702 <para> | |
703 In addition, the <literal>any</literal> parameter can be specified | |
704 to cache any responses: | |
705 <example> | |
706 scgi_cache_valid 200 302 10m; | |
707 scgi_cache_valid 301 1h; | |
708 scgi_cache_valid any 1m; | |
709 </example> | |
710 </para> | |
711 | |
712 <para> | |
713 Parameters of caching can also be set directly | |
714 in the response header. | |
715 This has higher priority than setting of caching time using the directive. | |
1349
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
716 <list type="bullet" compact="no"> |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
717 |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
718 <listitem> |
1180 | 719 The <header>X-Accel-Expires</header> header field sets caching time of a |
720 response in seconds. | |
721 The zero value disables caching for a response. | |
722 If the value starts with the <literal>@</literal> prefix, it sets an absolute | |
723 time in seconds since Epoch, up to which the response may be cached. | |
1349
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
724 </listitem> |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
725 |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
726 <listitem> |
1180 | 727 If the header does not include the <header>X-Accel-Expires</header> field, |
728 parameters of caching may be set in the header fields | |
729 <header>Expires</header> or <header>Cache-Control</header>. | |
1349
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
730 </listitem> |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
731 |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
732 <listitem> |
1180 | 733 If the header includes the <header>Set-Cookie</header> field, such a |
734 response will not be cached. | |
1349
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
735 </listitem> |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
736 |
1353
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
737 <listitem> |
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
738 If the header includes the <header>Vary</header> field |
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
739 with the special value “<literal>*</literal>”, such a |
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
740 response will not be cached (1.7.7). |
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
741 If the header includes the <header>Vary</header> field |
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
742 with another value, such a response will be cached |
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
743 taking into account the corresponding request header fields (1.7.7). |
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
744 </listitem> |
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
745 |
1349
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
746 </list> |
1180 | 747 Processing of one or more of these response header fields can be disabled |
748 using the <link id="scgi_ignore_headers"/> directive. | |
749 </para> | |
750 | |
751 </directive> | |
752 | |
753 | |
754 <directive name="scgi_connect_timeout"> | |
755 <syntax><value>time</value></syntax> | |
756 <default>60s</default> | |
757 <context>http</context> | |
758 <context>server</context> | |
759 <context>location</context> | |
760 | |
761 <para> | |
762 Defines a timeout for establishing a connection with an SCGI server. | |
763 It should be noted that this timeout cannot usually exceed 75 seconds. | |
764 </para> | |
765 | |
766 </directive> | |
767 | |
768 | |
1337
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
769 <directive name="scgi_force_ranges"> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
770 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
771 <default>off</default> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
772 <context>http</context> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
773 <context>server</context> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
774 <context>location</context> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
775 <appeared-in>1.7.7</appeared-in> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
776 |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
777 <para> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
778 Enables byte-range support |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
779 for both cached and uncached responses from the SCGI server |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
780 regardless of the <header>Accept-Ranges</header> field in these responses. |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
781 </para> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
782 |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
783 </directive> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
784 |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
785 |
1180 | 786 <directive name="scgi_hide_header"> |
787 <syntax><value>field</value></syntax> | |
788 <default/> | |
789 <context>http</context> | |
790 <context>server</context> | |
791 <context>location</context> | |
792 | |
793 <para> | |
794 By default, | |
795 nginx does not pass the header fields <header>Status</header> and | |
796 <header>X-Accel-...</header> from the response of an SCGI | |
797 server to a client. | |
798 The <literal>scgi_hide_header</literal> directive sets additional fields | |
799 that will not be passed. | |
800 If, on the contrary, the passing of fields needs to be permitted, | |
801 the <link id="scgi_pass_header"/> directive can be used. | |
802 </para> | |
803 | |
804 </directive> | |
805 | |
806 | |
807 <directive name="scgi_ignore_client_abort"> | |
808 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
809 <default>off</default> | |
810 <context>http</context> | |
811 <context>server</context> | |
812 <context>location</context> | |
813 | |
814 <para> | |
815 Determines whether the connection with an SCGI server should be | |
816 closed when a client closes the connection without waiting | |
817 for a response. | |
818 </para> | |
819 | |
820 </directive> | |
821 | |
822 | |
823 <directive name="scgi_ignore_headers"> | |
824 <syntax><value>field</value> ...</syntax> | |
825 <default/> | |
826 <context>http</context> | |
827 <context>server</context> | |
828 <context>location</context> | |
829 | |
830 <para> | |
831 Disables processing of certain response header fields from the SCGI server. | |
832 The following fields can be ignored: <header>X-Accel-Redirect</header>, | |
833 <header>X-Accel-Expires</header>, <header>X-Accel-Limit-Rate</header> (1.1.6), | |
834 <header>X-Accel-Buffering</header> (1.1.6), | |
835 <header>X-Accel-Charset</header> (1.1.6), <header>Expires</header>, | |
1345
da296387cdac
Documented the Vary support in proxy_ignore_headers and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1343
diff
changeset
|
836 <header>Cache-Control</header>, <header>Set-Cookie</header> (0.8.44), |
da296387cdac
Documented the Vary support in proxy_ignore_headers and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1343
diff
changeset
|
837 and <header>Vary</header> (1.7.7). |
1180 | 838 </para> |
839 | |
840 <para> | |
841 If not disabled, processing of these header fields has the following | |
842 effect: | |
843 <list type="bullet" compact="no"> | |
844 | |
845 <listitem> | |
846 <header>X-Accel-Expires</header>, <header>Expires</header>, | |
1345
da296387cdac
Documented the Vary support in proxy_ignore_headers and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1343
diff
changeset
|
847 <header>Cache-Control</header>, <header>Set-Cookie</header>, |
da296387cdac
Documented the Vary support in proxy_ignore_headers and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1343
diff
changeset
|
848 and <header>Vary</header> |
1180 | 849 set the parameters of response <link id="scgi_cache_valid">caching</link>; |
850 </listitem> | |
851 | |
852 <listitem> | |
853 <header>X-Accel-Redirect</header> performs an | |
854 <link doc="ngx_http_core_module.xml" id="internal">internal | |
855 redirect</link> to the specified URI; | |
856 </listitem> | |
857 | |
858 <listitem> | |
859 <header>X-Accel-Limit-Rate</header> sets the | |
860 <link doc="ngx_http_core_module.xml" id="limit_rate">rate | |
861 limit</link> for transmission of a response to a client; | |
862 </listitem> | |
863 | |
864 <listitem> | |
865 <header>X-Accel-Buffering</header> enables or disables | |
866 <link id="scgi_buffering">buffering</link> of a response; | |
867 </listitem> | |
868 | |
869 <listitem> | |
870 <header>X-Accel-Charset</header> sets the desired | |
871 <link doc="ngx_http_charset_module.xml" id="charset"/> | |
872 of a response. | |
873 </listitem> | |
874 | |
875 </list> | |
876 </para> | |
877 | |
878 </directive> | |
879 | |
880 | |
881 <directive name="scgi_intercept_errors"> | |
882 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
883 <default>off</default> | |
884 <context>http</context> | |
885 <context>server</context> | |
886 <context>location</context> | |
887 | |
888 <para> | |
889 Determines whether an SCGI server responses with codes greater than or equal | |
1803
621d0c682113
Clarified description of proxy_intercept_errors and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1796
diff
changeset
|
890 to 300 should be passed to a client |
621d0c682113
Clarified description of proxy_intercept_errors and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1796
diff
changeset
|
891 or be intercepted and redirected to nginx for processing |
1180 | 892 with the <link doc="ngx_http_core_module.xml" id="error_page"/> directive. |
893 </para> | |
894 | |
895 </directive> | |
896 | |
897 | |
1342
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
898 <directive name="scgi_limit_rate"> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
899 <syntax><value>rate</value></syntax> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
900 <default>0</default> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
901 <context>http</context> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
902 <context>server</context> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
903 <context>location</context> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
904 <appeared-in>1.7.7</appeared-in> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
905 |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
906 <para> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
907 Limits the speed of reading the response from the SCGI server. |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
908 The <value>rate</value> is specified in bytes per second. |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
909 The zero value disables rate limiting. |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
910 The limit is set per a request, and so if nginx simultaneously opens |
1343
1bdde28e359b
Fixed fallouts from the previous change.
Ruslan Ermilov <ru@nginx.com>
parents:
1342
diff
changeset
|
911 two connections to the SCGI server, |
1bdde28e359b
Fixed fallouts from the previous change.
Ruslan Ermilov <ru@nginx.com>
parents:
1342
diff
changeset
|
912 the overall rate will be twice as much as the specified limit. |
1342
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
913 The limitation works only if |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
914 <link id="scgi_buffering">buffering</link> of responses from the SCGI |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
915 server is enabled. |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
916 </para> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
917 |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
918 </directive> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
919 |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
920 |
1180 | 921 <directive name="scgi_max_temp_file_size"> |
922 <syntax><value>size</value></syntax> | |
923 <default>1024m</default> | |
924 <context>http</context> | |
925 <context>server</context> | |
926 <context>location</context> | |
927 | |
928 <para> | |
929 When <link id="scgi_buffering">buffering</link> of responses from the SCGI | |
930 server is enabled, and the whole response does not fit into the buffers | |
931 set by the <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> | |
932 directives, a part of the response can be saved to a temporary file. | |
933 This directive sets the maximum <value>size</value> of the temporary file. | |
934 The size of data written to the temporary file at a time is set | |
935 by the <link id="scgi_temp_file_write_size"/> directive. | |
936 </para> | |
937 | |
938 <para> | |
939 The zero value disables buffering of responses to temporary files. | |
940 </para> | |
941 | |
1352
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
942 <para> |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
943 <note> |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
944 This restriction does not apply to responses |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
945 that will be <link id="scgi_cache">cached</link> |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
946 or <link id="scgi_store">stored</link> on disk. |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
947 </note> |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
948 </para> |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
949 |
1180 | 950 </directive> |
951 | |
952 | |
953 <directive name="scgi_next_upstream"> | |
954 <syntax> | |
955 <literal>error</literal> | | |
956 <literal>timeout</literal> | | |
957 <literal>invalid_header</literal> | | |
958 <literal>http_500</literal> | | |
959 <literal>http_503</literal> | | |
960 <literal>http_403</literal> | | |
961 <literal>http_404</literal> | | |
1956
dd96a09dd4f7
Documented support for "429 Too Many Requests" response.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1923
diff
changeset
|
962 <literal>http_429</literal> | |
1669
c872b93682f4
Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
963 <literal>non_idempotent</literal> | |
1180 | 964 <literal>off</literal> |
965 ...</syntax> | |
966 <default>error timeout</default> | |
967 <context>http</context> | |
968 <context>server</context> | |
969 <context>location</context> | |
970 | |
971 <para> | |
972 Specifies in which cases a request should be passed to the next server: | |
973 <list type="tag"> | |
974 | |
975 <tag-name><literal>error</literal></tag-name> | |
976 <tag-desc>an error occurred while establishing a connection with the | |
977 server, passing a request to it, or reading the response header;</tag-desc> | |
978 | |
979 <tag-name><literal>timeout</literal></tag-name> | |
980 <tag-desc>a timeout has occurred while establishing a connection with the | |
981 server, passing a request to it, or reading the response header;</tag-desc> | |
982 | |
983 <tag-name><literal>invalid_header</literal></tag-name> | |
984 <tag-desc>a server returned an empty or invalid response;</tag-desc> | |
985 | |
986 <tag-name><literal>http_500</literal></tag-name> | |
987 <tag-desc>a server returned a response with the code 500;</tag-desc> | |
988 | |
989 <tag-name><literal>http_503</literal></tag-name> | |
990 <tag-desc>a server returned a response with the code 503;</tag-desc> | |
991 | |
992 <tag-name><literal>http_403</literal></tag-name> | |
993 <tag-desc>a server returned a response with the code 403;</tag-desc> | |
994 | |
995 <tag-name><literal>http_404</literal></tag-name> | |
996 <tag-desc>a server returned a response with the code 404;</tag-desc> | |
997 | |
1956
dd96a09dd4f7
Documented support for "429 Too Many Requests" response.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1923
diff
changeset
|
998 <tag-name><literal>http_429</literal></tag-name> |
dd96a09dd4f7
Documented support for "429 Too Many Requests" response.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1923
diff
changeset
|
999 <tag-desc>a server returned a response with the code 429 (1.11.13);</tag-desc> |
dd96a09dd4f7
Documented support for "429 Too Many Requests" response.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1923
diff
changeset
|
1000 |
1669
c872b93682f4
Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
1001 <tag-name id="non_idempotent"><literal>non_idempotent</literal></tag-name> |
c872b93682f4
Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
1002 <tag-desc>normally, requests with a |
1923
66a30a380fba
Fixed links to tools.ietf.org.
Ruslan Ermilov <ru@nginx.com>
parents:
1912
diff
changeset
|
1003 <link url="https://tools.ietf.org/html/rfc7231#section-4.2.2">non-idempotent</link> |
1669
c872b93682f4
Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
1004 method |
c872b93682f4
Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
1005 (<literal>POST</literal>, <literal>LOCK</literal>, <literal>PATCH</literal>) |
c872b93682f4
Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
1006 are not passed to the next server |
c872b93682f4
Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
1007 if a request has been sent to an upstream server (1.9.13); |
c872b93682f4
Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
1008 enabling this option explicitly allows retrying such requests; |
c872b93682f4
Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
1009 </tag-desc> |
c872b93682f4
Added "non_idempotent" for proxy_next_upstream and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1659
diff
changeset
|
1010 |
1180 | 1011 <tag-name><literal>off</literal></tag-name> |
1012 <tag-desc>disables passing a request to the next server.</tag-desc> | |
1013 | |
1014 </list> | |
1015 </para> | |
1016 | |
1017 <para> | |
1018 One should bear in mind that passing a request to the next server is | |
1019 only possible if nothing has been sent to a client yet. | |
1020 That is, if an error or timeout occurs in the middle of the | |
1021 transferring of a response, fixing this is impossible. | |
1022 </para> | |
1023 | |
1024 <para> | |
1289
57fc39924d42
Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1246
diff
changeset
|
1025 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
|
1026 <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
|
1027 attempt</link> of communication with a server. |
1180 | 1028 The cases of <literal>error</literal>, <literal>timeout</literal> and |
1029 <literal>invalid_header</literal> are always considered unsuccessful attempts, | |
1030 even if they are not specified in the directive. | |
1956
dd96a09dd4f7
Documented support for "429 Too Many Requests" response.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1923
diff
changeset
|
1031 The cases of <literal>http_500</literal>, <literal>http_503</literal>, |
dd96a09dd4f7
Documented support for "429 Too Many Requests" response.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1923
diff
changeset
|
1032 and <literal>http_429</literal> are |
1180 | 1033 considered unsuccessful attempts only if they are specified in the directive. |
1034 The cases of <literal>http_403</literal> and <literal>http_404</literal> | |
1035 are never considered unsuccessful attempts. | |
1036 </para> | |
1037 | |
1290
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1038 <para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1039 Passing a request to the next server can be limited by |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1040 <link id="scgi_next_upstream_tries">the number of tries</link> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1041 and by <link id="scgi_next_upstream_timeout">time</link>. |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1042 </para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1043 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1044 </directive> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1045 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1046 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1047 <directive name="scgi_next_upstream_timeout"> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1048 <syntax><value>time</value></syntax> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1049 <default>0</default> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1050 <context>http</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1051 <context>server</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1052 <context>location</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1053 <appeared-in>1.7.5</appeared-in> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1054 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1055 <para> |
1672
9c98c4498f08
Rephrased the "proxy_next_upstream_timeout" directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1669
diff
changeset
|
1056 Limits the time during which a request can be passed to the |
1290
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1057 <link id="scgi_next_upstream">next server</link>. |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1058 The <literal>0</literal> value turns off this limitation. |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1059 </para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1060 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1061 </directive> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1062 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1063 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1064 <directive name="scgi_next_upstream_tries"> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1065 <syntax><value>number</value></syntax> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1066 <default>0</default> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1067 <context>http</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1068 <context>server</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1069 <context>location</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1070 <appeared-in>1.7.5</appeared-in> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1071 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1072 <para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1073 Limits the number of possible tries for passing a request to the |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1074 <link id="scgi_next_upstream">next server</link>. |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1075 The <literal>0</literal> value turns off this limitation. |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1076 </para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
1077 |
1180 | 1078 </directive> |
1079 | |
1080 | |
1081 <directive name="scgi_no_cache"> | |
1082 <syntax><value>string</value> ...</syntax> | |
1083 <default/> | |
1084 <context>http</context> | |
1085 <context>server</context> | |
1086 <context>location</context> | |
1087 | |
1088 <para> | |
1089 Defines conditions under which the response will not be saved to a cache. | |
1090 If at least one value of the string parameters is not empty and is not | |
1091 equal to “0” then the response will not be saved: | |
1092 <example> | |
1093 scgi_no_cache $cookie_nocache $arg_nocache$arg_comment; | |
1094 scgi_no_cache $http_pragma $http_authorization; | |
1095 </example> | |
1096 Can be used along with the <link id="scgi_cache_bypass"/> directive. | |
1097 </para> | |
1098 | |
1099 </directive> | |
1100 | |
1101 | |
1102 <directive name="scgi_param"> | |
1103 <syntax> | |
1104 <value>parameter</value> <value>value</value> | |
1105 [<literal>if_not_empty</literal>]</syntax> | |
1106 <default/> | |
1107 <context>http</context> | |
1108 <context>server</context> | |
1109 <context>location</context> | |
1110 | |
1111 <para> | |
1112 Sets a <value>parameter</value> that should be passed to the SCGI server. | |
1113 The <value>value</value> can contain text, variables, and their combination. | |
1114 These directives are inherited from the previous level if and | |
1115 only if there are no | |
1116 <literal>scgi_param</literal> | |
1117 directives defined on the current level. | |
1118 </para> | |
1119 | |
1120 <para> | |
1121 Standard | |
1923
66a30a380fba
Fixed links to tools.ietf.org.
Ruslan Ermilov <ru@nginx.com>
parents:
1912
diff
changeset
|
1122 <link url="https://tools.ietf.org/html/rfc3875#section-4.1">CGI |
1180 | 1123 environment variables</link> |
1124 should be provided as SCGI headers, see the <path>scgi_params</path> file | |
1125 provided in the distribution: | |
1126 <example> | |
1127 location / { | |
1128 include scgi_params; | |
1129 ... | |
1130 } | |
1131 </example> | |
1132 </para> | |
1133 | |
1182
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
1134 <para> |
1731
ae6bdb65ca7f
Corrected article in fastcgi_param and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1696
diff
changeset
|
1135 If the directive is specified with <literal>if_not_empty</literal> (1.1.11) then |
1182
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
1136 such a parameter will not be passed to the server until its value is not empty: |
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
1137 <example> |
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
1138 scgi_param HTTPS $https if_not_empty; |
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
1139 </example> |
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
1140 </para> |
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
1141 |
1180 | 1142 </directive> |
1143 | |
1144 | |
1145 <directive name="scgi_pass"> | |
1146 <syntax><value>address</value></syntax> | |
1147 <default/> | |
1148 <context>location</context> | |
1149 <context>if in location</context> | |
1150 | |
1151 <para> | |
1152 Sets the address of an SCGI server. | |
1153 The address can be specified as a domain name or IP address, | |
1620
a225fa77389a
Port in fastcgi_pass, scgi_pass, and uwsgi_pass is not optional.
Ruslan Ermilov <ru@nginx.com>
parents:
1582
diff
changeset
|
1154 and a port: |
1180 | 1155 <example> |
1156 scgi_pass localhost:9000; | |
1157 </example> | |
1158 or as a UNIX-domain socket path: | |
1159 <example> | |
1160 scgi_pass unix:/tmp/scgi.socket; | |
1161 </example> | |
1162 </para> | |
1163 | |
1164 <para> | |
1165 If a domain name resolves to several addresses, all of them will be | |
1166 used in a round-robin fashion. | |
1167 In addition, an address can be specified as a | |
1168 <link doc="ngx_http_upstream_module.xml">server group</link>. | |
1169 </para> | |
1170 | |
1991
4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
Ruslan Ermilov <ru@nginx.com>
parents:
1973
diff
changeset
|
1171 <para> |
4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
Ruslan Ermilov <ru@nginx.com>
parents:
1973
diff
changeset
|
1172 Parameter value can contain variables. |
4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
Ruslan Ermilov <ru@nginx.com>
parents:
1973
diff
changeset
|
1173 In this case, if an address is specified as a domain name, |
4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
Ruslan Ermilov <ru@nginx.com>
parents:
1973
diff
changeset
|
1174 the name is searched among the described |
4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
Ruslan Ermilov <ru@nginx.com>
parents:
1973
diff
changeset
|
1175 <link doc="ngx_http_upstream_module.xml">server groups</link>, |
4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
Ruslan Ermilov <ru@nginx.com>
parents:
1973
diff
changeset
|
1176 and, if not found, is determined using a |
4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
Ruslan Ermilov <ru@nginx.com>
parents:
1973
diff
changeset
|
1177 <link doc="ngx_http_core_module.xml" id="resolver"/>. |
4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
Ruslan Ermilov <ru@nginx.com>
parents:
1973
diff
changeset
|
1178 </para> |
4f3dd2f548cf
Documented variables in fastcgi_pass, scgi_pass, and uwsgi_pass.
Ruslan Ermilov <ru@nginx.com>
parents:
1973
diff
changeset
|
1179 |
1180 | 1180 </directive> |
1181 | |
1182 | |
1183 <directive name="scgi_pass_header"> | |
1184 <syntax><value>field</value></syntax> | |
1185 <default/> | |
1186 <context>http</context> | |
1187 <context>server</context> | |
1188 <context>location</context> | |
1189 | |
1190 <para> | |
1191 Permits passing <link id="scgi_hide_header">otherwise disabled</link> header | |
1192 fields from an SCGI server to a client. | |
1193 </para> | |
1194 | |
1195 </directive> | |
1196 | |
1197 | |
1198 <directive name="scgi_pass_request_body"> | |
1199 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
1200 <default>on</default> | |
1201 <context>http</context> | |
1202 <context>server</context> | |
1203 <context>location</context> | |
1204 | |
1205 <para> | |
1206 Indicates whether the original request body is passed | |
1207 to the SCGI server. | |
1208 See also the <link id="scgi_pass_request_headers"/> directive. | |
1209 </para> | |
1210 | |
1211 </directive> | |
1212 | |
1213 | |
1214 <directive name="scgi_pass_request_headers"> | |
1215 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
1216 <default>on</default> | |
1217 <context>http</context> | |
1218 <context>server</context> | |
1219 <context>location</context> | |
1220 | |
1221 <para> | |
1222 Indicates whether the header fields of the original request are passed | |
1223 to the SCGI server. | |
1224 See also the <link id="scgi_pass_request_body"/> directive. | |
1225 </para> | |
1226 | |
1227 </directive> | |
1228 | |
1229 | |
1524
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1230 <directive name="scgi_read_timeout"> |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1231 <syntax><value>time</value></syntax> |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1232 <default>60s</default> |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1233 <context>http</context> |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1234 <context>server</context> |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1235 <context>location</context> |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1236 |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1237 <para> |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1238 Defines a timeout for reading a response from the SCGI server. |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1239 The timeout is set only between two successive read operations, |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1240 not for the transmission of the whole response. |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1241 If the SCGI server does not transmit anything within this time, |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1242 the connection is closed. |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1243 </para> |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1244 |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1245 </directive> |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1246 |
323b0d071166
Relocated proxy_read_timeout and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1443
diff
changeset
|
1247 |
1437
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1248 <directive name="scgi_request_buffering"> |
1659
680cbf783efe
Fixed some misuses of "value".
Ruslan Ermilov <ru@nginx.com>
parents:
1620
diff
changeset
|
1249 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
1437
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1250 <default>on</default> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1251 <context>http</context> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1252 <context>server</context> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1253 <context>location</context> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1254 <appeared-in>1.7.11</appeared-in> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1255 |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1256 <para> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1257 Enables or disables buffering of a client request body. |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1258 </para> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1259 |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1260 <para> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1261 When buffering is enabled, the entire request body is |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1262 <link doc="ngx_http_core_module.xml" id="client_body_buffer_size">read</link> |
1440
657885fd2b96
Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1437
diff
changeset
|
1263 from the client before sending the request to an SCGI server. |
1437
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1264 </para> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1265 |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1266 <para> |
1440
657885fd2b96
Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1437
diff
changeset
|
1267 When buffering is disabled, the request body is sent to the SCGI server |
1437
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1268 immediately as it is received. |
1440
657885fd2b96
Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1437
diff
changeset
|
1269 In this case, the request cannot be passed to the |
657885fd2b96
Corrected description of proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1437
diff
changeset
|
1270 <link id="scgi_next_upstream">next server</link> |
1437
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1271 if nginx already started sending the request body. |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1272 </para> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1273 |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1274 <para> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1275 When HTTP/1.1 chunked transfer encoding is used |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1276 to send the original request body, |
1443
a55553729d63
Unified text of scgi and uwsgi request buffering with proxy.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1440
diff
changeset
|
1277 the request body will be buffered regardless of the directive value. |
1437
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1278 </para> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1279 |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1280 </directive> |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1281 |
8e7995bb8c6b
Documented proxy_request_buffering and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1384
diff
changeset
|
1282 |
1180 | 1283 <directive name="scgi_send_timeout"> |
1284 <syntax><value>time</value></syntax> | |
1285 <default>60s</default> | |
1286 <context>http</context> | |
1287 <context>server</context> | |
1288 <context>location</context> | |
1289 | |
1290 <para> | |
1291 Sets a timeout for transmitting a request to the SCGI server. | |
1292 The timeout is set only between two successive write operations, | |
1293 not for the transmission of the whole request. | |
1294 If the SCGI server does not receive anything within this time, | |
1295 the connection is closed. | |
1296 </para> | |
1297 | |
1298 </directive> | |
1299 | |
1300 | |
1301 <directive name="scgi_store"> | |
1302 <syntax> | |
1303 <literal>on</literal> | | |
1304 <literal>off</literal> | | |
1305 <value>string</value></syntax> | |
1306 <default>off</default> | |
1307 <context>http</context> | |
1308 <context>server</context> | |
1309 <context>location</context> | |
1310 | |
1311 <para> | |
1312 Enables saving of files to a disk. | |
1313 The <literal>on</literal> parameter saves files with paths | |
1314 corresponding to the directives | |
1315 <link doc="ngx_http_core_module.xml" id="alias"/> or | |
1316 <link doc="ngx_http_core_module.xml" id="root"/>. | |
1317 The <literal>off</literal> parameter disables saving of files. | |
1318 In addition, the file name can be set explicitly using the | |
1319 <value>string</value> with variables: | |
1320 <example> | |
1321 scgi_store /data/www$original_uri; | |
1322 </example> | |
1323 </para> | |
1324 | |
1325 <para> | |
1326 The modification time of files is set according to the received | |
1327 <header>Last-Modified</header> response header field. | |
1328 The response is first written to a temporary file, | |
1329 and then the file is renamed. | |
1330 Starting from version 0.8.9, temporary files and the persistent store | |
1331 can be put on different file systems. | |
1332 However, be aware that in this case a file is copied | |
1333 across two file systems instead of the cheap renaming operation. | |
1334 It is thus recommended that for any given location both saved files and a | |
1335 directory holding temporary files, set by the <link id="scgi_temp_path"/> | |
1336 directive, are put on the same file system. | |
1337 </para> | |
1338 | |
1339 <para> | |
1340 This directive can be used to create local copies of static unchangeable | |
1341 files, e.g.: | |
1342 <example> | |
1343 location /images/ { | |
1184
55857cbf562d
Fixed alignment issues after mechanical conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1182
diff
changeset
|
1344 root /data/www; |
55857cbf562d
Fixed alignment issues after mechanical conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1182
diff
changeset
|
1345 error_page 404 = /fetch$uri; |
1180 | 1346 } |
1347 | |
1348 location /fetch/ { | |
1349 internal; | |
1350 | |
1351 scgi_pass backend:9000; | |
1352 ... | |
1353 | |
1354 scgi_store on; | |
1355 scgi_store_access user:rw group:rw all:r; | |
1356 scgi_temp_path /data/temp; | |
1357 | |
1184
55857cbf562d
Fixed alignment issues after mechanical conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1182
diff
changeset
|
1358 alias /data/www/; |
1180 | 1359 } |
1360 </example> | |
1361 </para> | |
1362 | |
1363 </directive> | |
1364 | |
1365 | |
1366 <directive name="scgi_store_access"> | |
1367 <syntax><value>users</value>:<value>permissions</value> ...</syntax> | |
1368 <default>user:rw</default> | |
1369 <context>http</context> | |
1370 <context>server</context> | |
1371 <context>location</context> | |
1372 | |
1373 <para> | |
1374 Sets access permissions for newly created files and directories, e.g.: | |
1375 <example> | |
1376 scgi_store_access user:rw group:rw all:r; | |
1377 </example> | |
1378 </para> | |
1379 | |
1380 <para> | |
1381 If any <literal>group</literal> or <literal>all</literal> access permissions | |
1382 are specified then <literal>user</literal> permissions may be omitted: | |
1383 <example> | |
1384 scgi_store_access group:rw all:r; | |
1385 </example> | |
1386 </para> | |
1387 | |
1388 </directive> | |
1389 | |
1390 | |
1391 <directive name="scgi_temp_file_write_size"> | |
1392 <syntax><value>size</value></syntax> | |
1393 <default>8k|16k</default> | |
1394 <context>http</context> | |
1395 <context>server</context> | |
1396 <context>location</context> | |
1397 | |
1398 <para> | |
1399 Limits the <value>size</value> of data written to a temporary file | |
1400 at a time, when buffering of responses from the SCGI server | |
1401 to temporary files is enabled. | |
1402 By default, <value>size</value> is limited by two buffers set by the | |
1403 <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> directives. | |
1404 The maximum size of a temporary file is set by the | |
1405 <link id="scgi_max_temp_file_size"/> directive. | |
1406 </para> | |
1407 | |
1408 </directive> | |
1409 | |
1410 | |
1411 <directive name="scgi_temp_path"> | |
1412 <syntax> | |
1413 <value>path</value> | |
1414 [<value>level1</value> | |
1415 [<value>level2</value> | |
1416 [<value>level3</value>]]]</syntax> | |
1417 <default>scgi_temp</default> | |
1418 <context>http</context> | |
1419 <context>server</context> | |
1420 <context>location</context> | |
1421 | |
1422 <para> | |
1423 Defines a directory for storing temporary files | |
1424 with data received from SCGI servers. | |
1425 Up to three-level subdirectory hierarchy can be used underneath the specified | |
1426 directory. | |
1427 For example, in the following configuration | |
1428 <example> | |
1429 scgi_temp_path /spool/nginx/scgi_temp 1 2; | |
1430 </example> | |
1431 a temporary file might look like this: | |
1432 <example> | |
1433 /spool/nginx/scgi_temp/<emphasis>7</emphasis>/<emphasis>45</emphasis>/00000123<emphasis>457</emphasis> | |
1434 </example> | |
1435 </para> | |
1436 | |
1384
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
1437 <para> |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
1438 See also the <literal>use_temp_path</literal> parameter of the |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
1439 <link id="scgi_cache_path"/> directive. |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
1440 </para> |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
1441 |
1180 | 1442 </directive> |
1443 | |
1444 </section> | |
1445 | |
1446 </module> |