Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_scgi_module.xml @ 1410:f5dcc23b214f
Deleted info about hash and ip_hash from the down parameter.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 09 Feb 2015 21:46:50 +0300 |
parents | 66ee77849563 |
children | 8e7995bb8c6b |
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" | |
1384
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
13 rev="15"> |
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"> | |
42 <syntax><value>address</value> | <literal>off</literal></syntax> | |
43 <default/> | |
44 <context>http</context> | |
45 <context>server</context> | |
46 <context>location</context> | |
47 | |
48 <para> | |
49 Makes outgoing connections to an SCGI server originate | |
50 from the specified local IP <value>address</value>. | |
51 Parameter value can contain variables (1.3.12). | |
52 The special value <literal>off</literal> (1.3.12) cancels the effect | |
53 of the <literal>scgi_bind</literal> directive | |
54 inherited from the previous configuration level, which allows the | |
55 system to auto-assign the local IP address. | |
56 </para> | |
57 | |
58 </directive> | |
59 | |
60 | |
61 <directive name="scgi_buffer_size"> | |
62 <syntax><value>size</value></syntax> | |
63 <default>4k|8k</default> | |
64 <context>http</context> | |
65 <context>server</context> | |
66 <context>location</context> | |
67 | |
68 <para> | |
69 Sets the <value>size</value> of the buffer used for reading the first part | |
70 of the response received from the SCGI server. | |
71 This part usually contains a small response header. | |
72 By default, the buffer size is equal to the size of one | |
73 buffer set by the <link id="scgi_buffers"/> directive. | |
74 It can be made smaller, however. | |
75 </para> | |
76 | |
77 </directive> | |
78 | |
79 | |
80 <directive name="scgi_buffering"> | |
81 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
82 <default>on</default> | |
83 <context>http</context> | |
84 <context>server</context> | |
85 <context>location</context> | |
86 | |
87 <para> | |
88 Enables or disables buffering of responses from the SCGI server. | |
89 </para> | |
90 | |
91 <para> | |
92 When buffering is enabled, nginx receives a response from the SCGI server | |
93 as soon as possible, saving it into the buffers set by the | |
94 <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> directives. | |
95 If the whole response does not fit into memory, a part of it can be saved | |
96 to a <link id="scgi_temp_path">temporary file</link> on the disk. | |
97 Writing to temporary files is controlled by the | |
98 <link id="scgi_max_temp_file_size"/> and | |
99 <link id="scgi_temp_file_write_size"/> directives. | |
100 </para> | |
101 | |
102 <para> | |
103 When buffering is disabled, the response is passed to a client synchronously, | |
104 immediately as it is received. | |
105 nginx will not try to read the whole response from the SCGI server. | |
106 The maximum size of the data that nginx can receive from the server | |
107 at a time is set by the <link id="scgi_buffer_size"/> directive. | |
108 </para> | |
109 | |
110 <para> | |
111 Buffering can also be enabled or disabled by passing | |
112 “<literal>yes</literal>” or “<literal>no</literal>” in the | |
113 <header>X-Accel-Buffering</header> response header field. | |
114 This capability can be disabled using the | |
115 <link id="scgi_ignore_headers"/> directive. | |
116 </para> | |
117 | |
118 </directive> | |
119 | |
120 | |
121 <directive name="scgi_buffers"> | |
122 <syntax><value>number</value> <value>size</value></syntax> | |
123 <default>8 4k|8k</default> | |
124 <context>http</context> | |
125 <context>server</context> | |
126 <context>location</context> | |
127 | |
128 <para> | |
129 Sets the <value>number</value> and <value>size</value> of the | |
130 buffers used for reading a response from the SCGI server, | |
131 for a single connection. | |
132 By default, the buffer size is equal to one memory page. | |
133 This is either 4K or 8K, depending on a platform. | |
134 </para> | |
135 | |
136 </directive> | |
137 | |
138 | |
139 <directive name="scgi_busy_buffers_size"> | |
140 <syntax><value>size</value></syntax> | |
141 <default>8k|16k</default> | |
142 <context>http</context> | |
143 <context>server</context> | |
144 <context>location</context> | |
145 | |
146 <para> | |
147 When <link id="scgi_buffering">buffering</link> of responses from the SCGI | |
148 server is enabled, limits the total <value>size</value> of buffers that | |
149 can be busy sending a response to the client while the response is not | |
150 yet fully read. | |
151 In the meantime, the rest of the buffers can be used for reading the response | |
152 and, if needed, buffering part of the response to a temporary file. | |
153 By default, <value>size</value> is limited by the size of two buffers set by the | |
154 <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> directives. | |
155 </para> | |
156 | |
157 </directive> | |
158 | |
159 | |
160 <directive name="scgi_cache"> | |
161 <syntax><value>zone</value> | <literal>off</literal></syntax> | |
162 <default>off</default> | |
163 <context>http</context> | |
164 <context>server</context> | |
165 <context>location</context> | |
166 | |
167 <para> | |
168 Defines a shared memory zone used for caching. | |
169 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
|
170 Parameter value can contain variables (1.7.9). |
1180 | 171 The <literal>off</literal> parameter disables caching inherited |
172 from the previous configuration level. | |
173 </para> | |
174 | |
175 </directive> | |
176 | |
177 | |
178 <directive name="scgi_cache_bypass"> | |
179 <syntax><value>string</value> ...</syntax> | |
180 <default/> | |
181 <context>http</context> | |
182 <context>server</context> | |
183 <context>location</context> | |
184 | |
185 <para> | |
186 Defines conditions under which the response will not be taken from a cache. | |
187 If at least one value of the string parameters is not empty and is not | |
188 equal to “0” then the response will not be taken from the cache: | |
189 <example> | |
190 scgi_cache_bypass $cookie_nocache $arg_nocache$arg_comment; | |
191 scgi_cache_bypass $http_pragma $http_authorization; | |
192 </example> | |
193 Can be used along with the <link id="scgi_no_cache"/> directive. | |
194 </para> | |
195 | |
196 </directive> | |
197 | |
198 | |
199 <directive name="scgi_cache_key"> | |
200 <syntax><value>string</value></syntax> | |
201 <default/> | |
202 <context>http</context> | |
203 <context>server</context> | |
204 <context>location</context> | |
205 | |
206 <para> | |
207 Defines a key for caching, for example | |
208 <example> | |
209 scgi_cache_key localhost:9000$request_uri; | |
210 </example> | |
211 </para> | |
212 | |
213 </directive> | |
214 | |
215 | |
216 <directive name="scgi_cache_lock"> | |
217 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
218 <default>off</default> | |
219 <context>http</context> | |
220 <context>server</context> | |
221 <context>location</context> | |
222 <appeared-in>1.1.12</appeared-in> | |
223 | |
224 <para> | |
225 When enabled, only one request at a time will be allowed to populate | |
226 a new cache element identified according to the <link id="scgi_cache_key"/> | |
227 directive by passing a request to an SCGI server. | |
228 Other requests of the same cache element will either wait | |
229 for a response to appear in the cache or the cache lock for | |
230 this element to be released, up to the time set by the | |
231 <link id="scgi_cache_lock_timeout"/> directive. | |
232 </para> | |
233 | |
234 </directive> | |
235 | |
236 | |
1379
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
237 <directive name="scgi_cache_lock_age"> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
238 <syntax><value>time</value></syntax> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
239 <default>5s</default> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
240 <context>http</context> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
241 <context>server</context> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
242 <context>location</context> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
243 <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
|
244 |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
245 <para> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
246 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
|
247 for populating a new cache element |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
248 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
|
249 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
|
250 </para> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
251 |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
252 </directive> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
253 |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
254 |
1180 | 255 <directive name="scgi_cache_lock_timeout"> |
256 <syntax><value>time</value></syntax> | |
257 <default>5s</default> | |
258 <context>http</context> | |
259 <context>server</context> | |
260 <context>location</context> | |
261 <appeared-in>1.1.12</appeared-in> | |
262 | |
263 <para> | |
264 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
|
265 When the <value>time</value> expires, |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
266 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
|
267 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
|
268 <note> |
91f5c089f4ca
Documented fastcgi_cache_lock_age and look-alikes.
Ruslan Ermilov <ru@nginx.com>
parents:
1353
diff
changeset
|
269 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
|
270 </note> |
1180 | 271 </para> |
272 | |
273 </directive> | |
274 | |
275 | |
276 <directive name="scgi_cache_methods"> | |
277 <syntax> | |
278 <literal>GET</literal> | | |
279 <literal>HEAD</literal> | | |
280 <literal>POST</literal> | |
281 ...</syntax> | |
282 <default>GET HEAD</default> | |
283 <context>http</context> | |
284 <context>server</context> | |
285 <context>location</context> | |
286 | |
287 <para> | |
288 If the client request method is listed in this directive then | |
289 the response will be cached. | |
290 “<literal>GET</literal>” and “<literal>HEAD</literal>” methods are always | |
291 added to the list, though it is recommended to specify them explicitly. | |
292 See also the <link id="scgi_no_cache"/> directive. | |
293 </para> | |
294 | |
295 </directive> | |
296 | |
297 | |
298 <directive name="scgi_cache_min_uses"> | |
299 <syntax><value>number</value></syntax> | |
300 <default>1</default> | |
301 <context>http</context> | |
302 <context>server</context> | |
303 <context>location</context> | |
304 | |
305 <para> | |
306 Sets the <value>number</value> of requests after which the response | |
307 will be cached. | |
308 </para> | |
309 | |
310 </directive> | |
311 | |
312 | |
313 <directive name="scgi_cache_path"> | |
314 <syntax> | |
315 <value>path</value> | |
316 [<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
|
317 [<literal>use_temp_path</literal>=<literal>on</literal>|<literal>off</literal>] |
1180 | 318 <literal>keys_zone</literal>=<value>name</value>:<value>size</value> |
319 [<literal>inactive</literal>=<value>time</value>] | |
320 [<literal>max_size</literal>=<value>size</value>] | |
321 [<literal>loader_files</literal>=<value>number</value>] | |
322 [<literal>loader_sleep</literal>=<value>time</value>] | |
323 [<literal>loader_threshold</literal>=<value>time</value>]</syntax> | |
324 <default/> | |
325 <context>http</context> | |
326 | |
327 <para> | |
328 Sets the path and other parameters of a cache. | |
329 Cache data are stored in files. | |
1190
dd4cfc6ce770
Corrected description of *_cache_path file names.
Ruslan Ermilov <ru@nginx.com>
parents:
1189
diff
changeset
|
330 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
|
331 applying the MD5 function to the |
dd4cfc6ce770
Corrected description of *_cache_path file names.
Ruslan Ermilov <ru@nginx.com>
parents:
1189
diff
changeset
|
332 <link id="scgi_cache_key">cache key</link>. |
1180 | 333 The <literal>levels</literal> parameter defines hierarchy levels of a cache. |
334 For example, in the following configuration | |
335 <example> | |
336 scgi_cache_path /data/nginx/cache levels=1:2 keys_zone=one:10m; | |
337 </example> | |
338 file names in a cache will look like this: | |
339 <example> | |
340 /data/nginx/cache/<emphasis>c</emphasis>/<emphasis>29</emphasis>/b7f54b2df7773722d382f4809d650<emphasis>29c</emphasis> | |
341 </example> | |
342 </para> | |
343 | |
344 <para> | |
345 A cached response is first written to a temporary file, | |
346 and then the file is renamed. | |
347 Starting from version 0.8.9, temporary files and the cache can be put on | |
348 different file systems. | |
349 However, be aware that in this case a file is copied | |
350 across two file systems instead of the cheap renaming operation. | |
351 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
|
352 holding temporary files |
1180 | 353 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
|
354 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
|
355 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
|
356 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
|
357 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
|
358 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
|
359 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
|
360 temporary files will be put directly in the cache directory. |
1180 | 361 </para> |
362 | |
363 <para> | |
364 In addition, all active keys and information about data are stored | |
365 in a shared memory zone, whose <value>name</value> and <value>size</value> | |
366 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
|
367 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
|
368 </para> |
f25d00109de0
Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1185
diff
changeset
|
369 |
f25d00109de0
Documented cache keys_zone memory estimates.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1185
diff
changeset
|
370 <para> |
1180 | 371 Cached data that are not accessed during the time specified by the |
372 <literal>inactive</literal> parameter get removed from the cache | |
373 regardless of their freshness. | |
374 By default, <literal>inactive</literal> is set to 10 minutes. | |
375 </para> | |
376 | |
377 <para> | |
378 The special “cache manager” process monitors the maximum cache size set | |
379 by the <literal>max_size</literal> parameter. | |
380 When this size is exceeded, it removes the least recently used data. | |
381 </para> | |
382 | |
383 <para> | |
384 A minute after the start the special “cache loader” process is activated. | |
385 It loads information about previously cached data stored on file system | |
386 into a cache zone. | |
387 The loading is done in iterations. | |
388 During one iteration no more than <literal>loader_files</literal> items | |
389 are loaded (by default, 100). | |
390 Besides, the duration of one iteration is limited by the | |
391 <literal>loader_threshold</literal> parameter (by default, 200 milliseconds). | |
392 Between iterations, a pause configured by the <literal>loader_sleep</literal> | |
393 parameter (by default, 50 milliseconds) is made. | |
394 </para> | |
395 | |
396 </directive> | |
397 | |
398 | |
399 <directive name="scgi_cache_purge"> | |
400 <syntax>string ...</syntax> | |
401 <default/> | |
402 <context>http</context> | |
403 <context>server</context> | |
404 <context>location</context> | |
405 <appeared-in>1.5.7</appeared-in> | |
406 | |
407 <para> | |
408 Defines conditions under which the request will be considered a cache | |
409 purge request. | |
410 If at least one value of the string parameters is not empty and is not equal | |
411 to “0” then the cache entry with a corresponding | |
412 <link id="scgi_cache_key">cache key</link> is removed. | |
413 The result of successful operation is indicated by returning | |
414 the <http-status code="204" text="No Content"/> response. | |
415 </para> | |
416 | |
417 <para> | |
418 If the <link id="scgi_cache_key">cache key</link> of a purge request ends | |
419 with an asterisk (“<literal>*</literal>”), all cache entries matching the | |
420 wildcard key will be removed from the cache. | |
421 </para> | |
422 | |
423 <para> | |
424 Example configuration: | |
425 <example> | |
426 scgi_cache_path /data/nginx/cache keys_zone=cache_zone:10m; | |
427 | |
428 map $request_method $purge_method { | |
429 PURGE 1; | |
430 default 0; | |
431 } | |
432 | |
433 server { | |
434 ... | |
435 location / { | |
1185
f9c8336fe43c
Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents:
1184
diff
changeset
|
436 scgi_pass backend; |
f9c8336fe43c
Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents:
1184
diff
changeset
|
437 scgi_cache cache_zone; |
f9c8336fe43c
Aligned configuration examples with fastcgi/scgi_cache_purge.
Ruslan Ermilov <ru@nginx.com>
parents:
1184
diff
changeset
|
438 scgi_cache_key $uri; |
1180 | 439 scgi_cache_purge $purge_method; |
440 } | |
441 } | |
442 </example> | |
443 <note> | |
444 This functionality is available as part of our | |
445 <commercial_version>commercial subscription</commercial_version>. | |
446 </note> | |
447 </para> | |
448 | |
449 </directive> | |
450 | |
451 | |
452 <directive name="scgi_cache_revalidate"> | |
453 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
454 <default>off</default> | |
455 <context>http</context> | |
456 <context>server</context> | |
457 <context>location</context> | |
458 <appeared-in>1.5.7</appeared-in> | |
459 | |
460 <para> | |
461 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
|
462 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
|
463 header fields. |
1180 | 464 </para> |
465 | |
466 </directive> | |
467 | |
468 | |
469 <directive name="scgi_cache_use_stale"> | |
470 <syntax> | |
471 <literal>error</literal> | | |
472 <literal>timeout</literal> | | |
473 <literal>invalid_header</literal> | | |
474 <literal>updating</literal> | | |
475 <literal>http_500</literal> | | |
476 <literal>http_503</literal> | | |
477 <literal>http_403</literal> | | |
478 <literal>http_404</literal> | | |
479 <literal>off</literal> | |
480 ...</syntax> | |
481 <default>off</default> | |
482 <context>http</context> | |
483 <context>server</context> | |
484 <context>location</context> | |
485 | |
486 <para> | |
487 Determines in which cases a stale cached response can be used | |
488 when an error occurs during communication with the SCGI server. | |
489 The directive’s parameters match the parameters of the | |
490 <link id="scgi_next_upstream"/> directive. | |
491 </para> | |
492 | |
493 <para> | |
494 Additionally, the <literal>updating</literal> parameter permits | |
495 using a stale cached response if it is currently being updated. | |
496 This allows minimizing the number of accesses to SCGI servers | |
497 when updating cached data. | |
498 </para> | |
499 | |
500 <para> | |
501 To minimize the number of accesses to SCGI servers when | |
502 populating a new cache element, the <link id="scgi_cache_lock"/> | |
503 directive can be used. | |
504 </para> | |
505 | |
506 </directive> | |
507 | |
508 | |
509 <directive name="scgi_cache_valid"> | |
510 <syntax>[<value>code</value> ...] <value>time</value></syntax> | |
511 <default/> | |
512 <context>http</context> | |
513 <context>server</context> | |
514 <context>location</context> | |
515 | |
516 <para> | |
517 Sets caching time for different response codes. | |
518 For example, the following directives | |
519 <example> | |
520 scgi_cache_valid 200 302 10m; | |
521 scgi_cache_valid 404 1m; | |
522 </example> | |
523 set 10 minutes of caching for responses with codes 200 and 302 | |
524 and 1 minute for responses with code 404. | |
525 </para> | |
526 | |
527 <para> | |
528 If only caching <value>time</value> is specified | |
529 <example> | |
530 scgi_cache_valid 5m; | |
531 </example> | |
532 then only 200, 301, and 302 responses are cached. | |
533 </para> | |
534 | |
535 <para> | |
536 In addition, the <literal>any</literal> parameter can be specified | |
537 to cache any responses: | |
538 <example> | |
539 scgi_cache_valid 200 302 10m; | |
540 scgi_cache_valid 301 1h; | |
541 scgi_cache_valid any 1m; | |
542 </example> | |
543 </para> | |
544 | |
545 <para> | |
546 Parameters of caching can also be set directly | |
547 in the response header. | |
548 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
|
549 <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
|
550 |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
551 <listitem> |
1180 | 552 The <header>X-Accel-Expires</header> header field sets caching time of a |
553 response in seconds. | |
554 The zero value disables caching for a response. | |
555 If the value starts with the <literal>@</literal> prefix, it sets an absolute | |
556 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
|
557 </listitem> |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
558 |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
559 <listitem> |
1180 | 560 If the header does not include the <header>X-Accel-Expires</header> field, |
561 parameters of caching may be set in the header fields | |
562 <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
|
563 </listitem> |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
564 |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
565 <listitem> |
1180 | 566 If the header includes the <header>Set-Cookie</header> field, such a |
567 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
|
568 </listitem> |
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
569 |
1353
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
570 <listitem> |
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
571 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
|
572 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
|
573 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
|
574 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
|
575 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
|
576 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
|
577 </listitem> |
25db29c8875e
Documented how the "Vary" response header field affects caching.
Ruslan Ermilov <ru@nginx.com>
parents:
1352
diff
changeset
|
578 |
1349
97c8b146cb0e
Split the long paragraph about caching parameters into the list.
Ruslan Ermilov <ru@nginx.com>
parents:
1345
diff
changeset
|
579 </list> |
1180 | 580 Processing of one or more of these response header fields can be disabled |
581 using the <link id="scgi_ignore_headers"/> directive. | |
582 </para> | |
583 | |
584 </directive> | |
585 | |
586 | |
587 <directive name="scgi_connect_timeout"> | |
588 <syntax><value>time</value></syntax> | |
589 <default>60s</default> | |
590 <context>http</context> | |
591 <context>server</context> | |
592 <context>location</context> | |
593 | |
594 <para> | |
595 Defines a timeout for establishing a connection with an SCGI server. | |
596 It should be noted that this timeout cannot usually exceed 75 seconds. | |
597 </para> | |
598 | |
599 </directive> | |
600 | |
601 | |
1337
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
602 <directive name="scgi_force_ranges"> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
603 <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
|
604 <default>off</default> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
605 <context>http</context> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
606 <context>server</context> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
607 <context>location</context> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
608 <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
|
609 |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
610 <para> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
611 Enables byte-range support |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
612 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
|
613 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
|
614 </para> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
615 |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
616 </directive> |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
617 |
91a064bdb4f9
Documented the "proxy_force_ranges" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1290
diff
changeset
|
618 |
1180 | 619 <directive name="scgi_hide_header"> |
620 <syntax><value>field</value></syntax> | |
621 <default/> | |
622 <context>http</context> | |
623 <context>server</context> | |
624 <context>location</context> | |
625 | |
626 <para> | |
627 By default, | |
628 nginx does not pass the header fields <header>Status</header> and | |
629 <header>X-Accel-...</header> from the response of an SCGI | |
630 server to a client. | |
631 The <literal>scgi_hide_header</literal> directive sets additional fields | |
632 that will not be passed. | |
633 If, on the contrary, the passing of fields needs to be permitted, | |
634 the <link id="scgi_pass_header"/> directive can be used. | |
635 </para> | |
636 | |
637 </directive> | |
638 | |
639 | |
640 <directive name="scgi_ignore_client_abort"> | |
641 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
642 <default>off</default> | |
643 <context>http</context> | |
644 <context>server</context> | |
645 <context>location</context> | |
646 | |
647 <para> | |
648 Determines whether the connection with an SCGI server should be | |
649 closed when a client closes the connection without waiting | |
650 for a response. | |
651 </para> | |
652 | |
653 </directive> | |
654 | |
655 | |
656 <directive name="scgi_ignore_headers"> | |
657 <syntax><value>field</value> ...</syntax> | |
658 <default/> | |
659 <context>http</context> | |
660 <context>server</context> | |
661 <context>location</context> | |
662 | |
663 <para> | |
664 Disables processing of certain response header fields from the SCGI server. | |
665 The following fields can be ignored: <header>X-Accel-Redirect</header>, | |
666 <header>X-Accel-Expires</header>, <header>X-Accel-Limit-Rate</header> (1.1.6), | |
667 <header>X-Accel-Buffering</header> (1.1.6), | |
668 <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
|
669 <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
|
670 and <header>Vary</header> (1.7.7). |
1180 | 671 </para> |
672 | |
673 <para> | |
674 If not disabled, processing of these header fields has the following | |
675 effect: | |
676 <list type="bullet" compact="no"> | |
677 | |
678 <listitem> | |
679 <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
|
680 <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
|
681 and <header>Vary</header> |
1180 | 682 set the parameters of response <link id="scgi_cache_valid">caching</link>; |
683 </listitem> | |
684 | |
685 <listitem> | |
686 <header>X-Accel-Redirect</header> performs an | |
687 <link doc="ngx_http_core_module.xml" id="internal">internal | |
688 redirect</link> to the specified URI; | |
689 </listitem> | |
690 | |
691 <listitem> | |
692 <header>X-Accel-Limit-Rate</header> sets the | |
693 <link doc="ngx_http_core_module.xml" id="limit_rate">rate | |
694 limit</link> for transmission of a response to a client; | |
695 </listitem> | |
696 | |
697 <listitem> | |
698 <header>X-Accel-Buffering</header> enables or disables | |
699 <link id="scgi_buffering">buffering</link> of a response; | |
700 </listitem> | |
701 | |
702 <listitem> | |
703 <header>X-Accel-Charset</header> sets the desired | |
704 <link doc="ngx_http_charset_module.xml" id="charset"/> | |
705 of a response. | |
706 </listitem> | |
707 | |
708 </list> | |
709 </para> | |
710 | |
711 </directive> | |
712 | |
713 | |
714 <directive name="scgi_intercept_errors"> | |
715 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
716 <default>off</default> | |
717 <context>http</context> | |
718 <context>server</context> | |
719 <context>location</context> | |
720 | |
721 <para> | |
722 Determines whether an SCGI server responses with codes greater than or equal | |
723 to 300 should be passed to a client or be redirected to nginx for processing | |
724 with the <link doc="ngx_http_core_module.xml" id="error_page"/> directive. | |
725 </para> | |
726 | |
727 </directive> | |
728 | |
729 | |
1342
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
730 <directive name="scgi_limit_rate"> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
731 <syntax><value>rate</value></syntax> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
732 <default>0</default> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
733 <context>http</context> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
734 <context>server</context> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
735 <context>location</context> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
736 <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
|
737 |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
738 <para> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
739 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
|
740 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
|
741 The zero value disables rate limiting. |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
742 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
|
743 two connections to the SCGI server, |
1bdde28e359b
Fixed fallouts from the previous change.
Ruslan Ermilov <ru@nginx.com>
parents:
1342
diff
changeset
|
744 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
|
745 The limitation works only if |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
746 <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
|
747 server is enabled. |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
748 </para> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
749 |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
750 </directive> |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
751 |
758fc0b02651
Documented the "proxy_limit_rate" directive and friends.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1337
diff
changeset
|
752 |
1180 | 753 <directive name="scgi_max_temp_file_size"> |
754 <syntax><value>size</value></syntax> | |
755 <default>1024m</default> | |
756 <context>http</context> | |
757 <context>server</context> | |
758 <context>location</context> | |
759 | |
760 <para> | |
761 When <link id="scgi_buffering">buffering</link> of responses from the SCGI | |
762 server is enabled, and the whole response does not fit into the buffers | |
763 set by the <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> | |
764 directives, a part of the response can be saved to a temporary file. | |
765 This directive sets the maximum <value>size</value> of the temporary file. | |
766 The size of data written to the temporary file at a time is set | |
767 by the <link id="scgi_temp_file_write_size"/> directive. | |
768 </para> | |
769 | |
770 <para> | |
771 The zero value disables buffering of responses to temporary files. | |
772 </para> | |
773 | |
1352
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
774 <para> |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
775 <note> |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
776 This restriction does not apply to responses |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
777 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
|
778 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
|
779 </note> |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
780 </para> |
dbb618f60a54
Elaborate on writing proxied responses to files.
Ruslan Ermilov <ru@nginx.com>
parents:
1349
diff
changeset
|
781 |
1180 | 782 </directive> |
783 | |
784 | |
785 <directive name="scgi_next_upstream"> | |
786 <syntax> | |
787 <literal>error</literal> | | |
788 <literal>timeout</literal> | | |
789 <literal>invalid_header</literal> | | |
790 <literal>http_500</literal> | | |
791 <literal>http_503</literal> | | |
792 <literal>http_403</literal> | | |
793 <literal>http_404</literal> | | |
794 <literal>off</literal> | |
795 ...</syntax> | |
796 <default>error timeout</default> | |
797 <context>http</context> | |
798 <context>server</context> | |
799 <context>location</context> | |
800 | |
801 <para> | |
802 Specifies in which cases a request should be passed to the next server: | |
803 <list type="tag"> | |
804 | |
805 <tag-name><literal>error</literal></tag-name> | |
806 <tag-desc>an error occurred while establishing a connection with the | |
807 server, passing a request to it, or reading the response header;</tag-desc> | |
808 | |
809 <tag-name><literal>timeout</literal></tag-name> | |
810 <tag-desc>a timeout has occurred while establishing a connection with the | |
811 server, passing a request to it, or reading the response header;</tag-desc> | |
812 | |
813 <tag-name><literal>invalid_header</literal></tag-name> | |
814 <tag-desc>a server returned an empty or invalid response;</tag-desc> | |
815 | |
816 <tag-name><literal>http_500</literal></tag-name> | |
817 <tag-desc>a server returned a response with the code 500;</tag-desc> | |
818 | |
819 <tag-name><literal>http_503</literal></tag-name> | |
820 <tag-desc>a server returned a response with the code 503;</tag-desc> | |
821 | |
822 <tag-name><literal>http_403</literal></tag-name> | |
823 <tag-desc>a server returned a response with the code 403;</tag-desc> | |
824 | |
825 <tag-name><literal>http_404</literal></tag-name> | |
826 <tag-desc>a server returned a response with the code 404;</tag-desc> | |
827 | |
828 <tag-name><literal>off</literal></tag-name> | |
829 <tag-desc>disables passing a request to the next server.</tag-desc> | |
830 | |
831 </list> | |
832 </para> | |
833 | |
834 <para> | |
835 One should bear in mind that passing a request to the next server is | |
836 only possible if nothing has been sent to a client yet. | |
837 That is, if an error or timeout occurs in the middle of the | |
838 transferring of a response, fixing this is impossible. | |
839 </para> | |
840 | |
841 <para> | |
1289
57fc39924d42
Proxy/memcached/fastcgi/scgi/uwsgi: updated link in _next_upstream directives.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1246
diff
changeset
|
842 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
|
843 <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
|
844 attempt</link> of communication with a server. |
1180 | 845 The cases of <literal>error</literal>, <literal>timeout</literal> and |
846 <literal>invalid_header</literal> are always considered unsuccessful attempts, | |
847 even if they are not specified in the directive. | |
848 The cases of <literal>http_500</literal> and <literal>http_503</literal> are | |
849 considered unsuccessful attempts only if they are specified in the directive. | |
850 The cases of <literal>http_403</literal> and <literal>http_404</literal> | |
851 are never considered unsuccessful attempts. | |
852 </para> | |
853 | |
1290
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
854 <para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
855 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
|
856 <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
|
857 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
|
858 </para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
859 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
860 </directive> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
861 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
862 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
863 <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
|
864 <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
|
865 <default>0</default> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
866 <context>http</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
867 <context>server</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
868 <context>location</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
869 <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
|
870 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
871 <para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
872 Limits the time allowed to pass 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
|
873 <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
|
874 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
|
875 </para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
876 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
877 </directive> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
878 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
879 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
880 <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
|
881 <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
|
882 <default>0</default> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
883 <context>http</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
884 <context>server</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
885 <context>location</context> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
886 <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
|
887 |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
888 <para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
889 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
|
890 <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
|
891 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
|
892 </para> |
f5cc9f2aef9a
Proxy/memcached/fastcgi/scgi/uwsgi: _next_upstream_timeout,_next_upstream_tries.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1289
diff
changeset
|
893 |
1180 | 894 </directive> |
895 | |
896 | |
897 <directive name="scgi_no_cache"> | |
898 <syntax><value>string</value> ...</syntax> | |
899 <default/> | |
900 <context>http</context> | |
901 <context>server</context> | |
902 <context>location</context> | |
903 | |
904 <para> | |
905 Defines conditions under which the response will not be saved to a cache. | |
906 If at least one value of the string parameters is not empty and is not | |
907 equal to “0” then the response will not be saved: | |
908 <example> | |
909 scgi_no_cache $cookie_nocache $arg_nocache$arg_comment; | |
910 scgi_no_cache $http_pragma $http_authorization; | |
911 </example> | |
912 Can be used along with the <link id="scgi_cache_bypass"/> directive. | |
913 </para> | |
914 | |
915 </directive> | |
916 | |
917 | |
918 <directive name="scgi_param"> | |
919 <syntax> | |
920 <value>parameter</value> <value>value</value> | |
921 [<literal>if_not_empty</literal>]</syntax> | |
922 <default/> | |
923 <context>http</context> | |
924 <context>server</context> | |
925 <context>location</context> | |
926 | |
927 <para> | |
928 Sets a <value>parameter</value> that should be passed to the SCGI server. | |
929 The <value>value</value> can contain text, variables, and their combination. | |
930 These directives are inherited from the previous level if and | |
931 only if there are no | |
932 <literal>scgi_param</literal> | |
933 directives defined on the current level. | |
934 </para> | |
935 | |
936 <para> | |
937 Standard | |
938 <link url="http://tools.ietf.org/html/rfc3875#section-4.1">CGI | |
939 environment variables</link> | |
940 should be provided as SCGI headers, see the <path>scgi_params</path> file | |
941 provided in the distribution: | |
942 <example> | |
943 location / { | |
944 include scgi_params; | |
945 ... | |
946 } | |
947 </example> | |
948 </para> | |
949 | |
1182
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
950 <para> |
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
951 If a directive is specified with <literal>if_not_empty</literal> (1.1.11) then |
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
952 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
|
953 <example> |
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
954 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
|
955 </example> |
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
956 </para> |
ec1097156f81
Scgi: restored if_not_empty lost during conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1180
diff
changeset
|
957 |
1180 | 958 </directive> |
959 | |
960 | |
961 <directive name="scgi_pass"> | |
962 <syntax><value>address</value></syntax> | |
963 <default/> | |
964 <context>location</context> | |
965 <context>if in location</context> | |
966 | |
967 <para> | |
968 Sets the address of an SCGI server. | |
969 The address can be specified as a domain name or IP address, | |
970 and an optional port: | |
971 <example> | |
972 scgi_pass localhost:9000; | |
973 </example> | |
974 or as a UNIX-domain socket path: | |
975 <example> | |
976 scgi_pass unix:/tmp/scgi.socket; | |
977 </example> | |
978 </para> | |
979 | |
980 <para> | |
981 If a domain name resolves to several addresses, all of them will be | |
982 used in a round-robin fashion. | |
983 In addition, an address can be specified as a | |
984 <link doc="ngx_http_upstream_module.xml">server group</link>. | |
985 </para> | |
986 | |
987 </directive> | |
988 | |
989 | |
990 <directive name="scgi_pass_header"> | |
991 <syntax><value>field</value></syntax> | |
992 <default/> | |
993 <context>http</context> | |
994 <context>server</context> | |
995 <context>location</context> | |
996 | |
997 <para> | |
998 Permits passing <link id="scgi_hide_header">otherwise disabled</link> header | |
999 fields from an SCGI server to a client. | |
1000 </para> | |
1001 | |
1002 </directive> | |
1003 | |
1004 | |
1005 <directive name="scgi_read_timeout"> | |
1006 <syntax><value>time</value></syntax> | |
1007 <default>60s</default> | |
1008 <context>http</context> | |
1009 <context>server</context> | |
1010 <context>location</context> | |
1011 | |
1012 <para> | |
1013 Defines a timeout for reading a response from the SCGI server. | |
1014 The timeout is set only between two successive read operations, | |
1015 not for the transmission of the whole response. | |
1016 If the SCGI server does not transmit anything within this time, | |
1017 the connection is closed. | |
1018 </para> | |
1019 | |
1020 </directive> | |
1021 | |
1022 | |
1023 <directive name="scgi_pass_request_body"> | |
1024 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
1025 <default>on</default> | |
1026 <context>http</context> | |
1027 <context>server</context> | |
1028 <context>location</context> | |
1029 | |
1030 <para> | |
1031 Indicates whether the original request body is passed | |
1032 to the SCGI server. | |
1033 See also the <link id="scgi_pass_request_headers"/> directive. | |
1034 </para> | |
1035 | |
1036 </directive> | |
1037 | |
1038 | |
1039 <directive name="scgi_pass_request_headers"> | |
1040 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
1041 <default>on</default> | |
1042 <context>http</context> | |
1043 <context>server</context> | |
1044 <context>location</context> | |
1045 | |
1046 <para> | |
1047 Indicates whether the header fields of the original request are passed | |
1048 to the SCGI server. | |
1049 See also the <link id="scgi_pass_request_body"/> directive. | |
1050 </para> | |
1051 | |
1052 </directive> | |
1053 | |
1054 | |
1055 <directive name="scgi_send_timeout"> | |
1056 <syntax><value>time</value></syntax> | |
1057 <default>60s</default> | |
1058 <context>http</context> | |
1059 <context>server</context> | |
1060 <context>location</context> | |
1061 | |
1062 <para> | |
1063 Sets a timeout for transmitting a request to the SCGI server. | |
1064 The timeout is set only between two successive write operations, | |
1065 not for the transmission of the whole request. | |
1066 If the SCGI server does not receive anything within this time, | |
1067 the connection is closed. | |
1068 </para> | |
1069 | |
1070 </directive> | |
1071 | |
1072 | |
1073 <directive name="scgi_store"> | |
1074 <syntax> | |
1075 <literal>on</literal> | | |
1076 <literal>off</literal> | | |
1077 <value>string</value></syntax> | |
1078 <default>off</default> | |
1079 <context>http</context> | |
1080 <context>server</context> | |
1081 <context>location</context> | |
1082 | |
1083 <para> | |
1084 Enables saving of files to a disk. | |
1085 The <literal>on</literal> parameter saves files with paths | |
1086 corresponding to the directives | |
1087 <link doc="ngx_http_core_module.xml" id="alias"/> or | |
1088 <link doc="ngx_http_core_module.xml" id="root"/>. | |
1089 The <literal>off</literal> parameter disables saving of files. | |
1090 In addition, the file name can be set explicitly using the | |
1091 <value>string</value> with variables: | |
1092 <example> | |
1093 scgi_store /data/www$original_uri; | |
1094 </example> | |
1095 </para> | |
1096 | |
1097 <para> | |
1098 The modification time of files is set according to the received | |
1099 <header>Last-Modified</header> response header field. | |
1100 The response is first written to a temporary file, | |
1101 and then the file is renamed. | |
1102 Starting from version 0.8.9, temporary files and the persistent store | |
1103 can be put on different file systems. | |
1104 However, be aware that in this case a file is copied | |
1105 across two file systems instead of the cheap renaming operation. | |
1106 It is thus recommended that for any given location both saved files and a | |
1107 directory holding temporary files, set by the <link id="scgi_temp_path"/> | |
1108 directive, are put on the same file system. | |
1109 </para> | |
1110 | |
1111 <para> | |
1112 This directive can be used to create local copies of static unchangeable | |
1113 files, e.g.: | |
1114 <example> | |
1115 location /images/ { | |
1184
55857cbf562d
Fixed alignment issues after mechanical conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1182
diff
changeset
|
1116 root /data/www; |
55857cbf562d
Fixed alignment issues after mechanical conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1182
diff
changeset
|
1117 error_page 404 = /fetch$uri; |
1180 | 1118 } |
1119 | |
1120 location /fetch/ { | |
1121 internal; | |
1122 | |
1123 scgi_pass backend:9000; | |
1124 ... | |
1125 | |
1126 scgi_store on; | |
1127 scgi_store_access user:rw group:rw all:r; | |
1128 scgi_temp_path /data/temp; | |
1129 | |
1184
55857cbf562d
Fixed alignment issues after mechanical conversion from fastcgi.
Ruslan Ermilov <ru@nginx.com>
parents:
1182
diff
changeset
|
1130 alias /data/www/; |
1180 | 1131 } |
1132 </example> | |
1133 </para> | |
1134 | |
1135 </directive> | |
1136 | |
1137 | |
1138 <directive name="scgi_store_access"> | |
1139 <syntax><value>users</value>:<value>permissions</value> ...</syntax> | |
1140 <default>user:rw</default> | |
1141 <context>http</context> | |
1142 <context>server</context> | |
1143 <context>location</context> | |
1144 | |
1145 <para> | |
1146 Sets access permissions for newly created files and directories, e.g.: | |
1147 <example> | |
1148 scgi_store_access user:rw group:rw all:r; | |
1149 </example> | |
1150 </para> | |
1151 | |
1152 <para> | |
1153 If any <literal>group</literal> or <literal>all</literal> access permissions | |
1154 are specified then <literal>user</literal> permissions may be omitted: | |
1155 <example> | |
1156 scgi_store_access group:rw all:r; | |
1157 </example> | |
1158 </para> | |
1159 | |
1160 </directive> | |
1161 | |
1162 | |
1163 <directive name="scgi_temp_file_write_size"> | |
1164 <syntax><value>size</value></syntax> | |
1165 <default>8k|16k</default> | |
1166 <context>http</context> | |
1167 <context>server</context> | |
1168 <context>location</context> | |
1169 | |
1170 <para> | |
1171 Limits the <value>size</value> of data written to a temporary file | |
1172 at a time, when buffering of responses from the SCGI server | |
1173 to temporary files is enabled. | |
1174 By default, <value>size</value> is limited by two buffers set by the | |
1175 <link id="scgi_buffer_size"/> and <link id="scgi_buffers"/> directives. | |
1176 The maximum size of a temporary file is set by the | |
1177 <link id="scgi_max_temp_file_size"/> directive. | |
1178 </para> | |
1179 | |
1180 </directive> | |
1181 | |
1182 | |
1183 <directive name="scgi_temp_path"> | |
1184 <syntax> | |
1185 <value>path</value> | |
1186 [<value>level1</value> | |
1187 [<value>level2</value> | |
1188 [<value>level3</value>]]]</syntax> | |
1189 <default>scgi_temp</default> | |
1190 <context>http</context> | |
1191 <context>server</context> | |
1192 <context>location</context> | |
1193 | |
1194 <para> | |
1195 Defines a directory for storing temporary files | |
1196 with data received from SCGI servers. | |
1197 Up to three-level subdirectory hierarchy can be used underneath the specified | |
1198 directory. | |
1199 For example, in the following configuration | |
1200 <example> | |
1201 scgi_temp_path /spool/nginx/scgi_temp 1 2; | |
1202 </example> | |
1203 a temporary file might look like this: | |
1204 <example> | |
1205 /spool/nginx/scgi_temp/<emphasis>7</emphasis>/<emphasis>45</emphasis>/00000123<emphasis>457</emphasis> | |
1206 </example> | |
1207 </para> | |
1208 | |
1384
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
1209 <para> |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
1210 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
|
1211 <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
|
1212 </para> |
66ee77849563
Documented the use_temp_path parameter of the proxy_cache_path directive.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1382
diff
changeset
|
1213 |
1180 | 1214 </directive> |
1215 | |
1216 </section> | |
1217 | |
1218 </module> |