Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_fastcgi_module.xml @ 589:764fbac1b8b4
Added document revision.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 17 Jul 2012 05:02:15 +0000 |
parents | be54c443235a |
children | ce121bf644f5 |
rev | line source |
---|---|
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
575
diff
changeset
|
7 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 <module name="Module ngx_http_fastcgi_module" |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 link="/en/docs/http/ngx_http_fastcgi_module.html" |
589 | 12 lang="en" |
13 rev="1"> | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 <section id="summary"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 The <literal>ngx_http_fastcgi_module</literal> module allows to pass |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 requests to a FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 <section id="example" name="Example Configuration"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 location / { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 fastcgi_pass localhost:9000; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 fastcgi_index index.php; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 fastcgi_param QUERY_STRING $query_string; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 fastcgi_param REQUEST_METHOD $request_method; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 fastcgi_param CONTENT_TYPE $content_type; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 fastcgi_param CONTENT_LENGTH $content_length; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 } |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 <section id="directives" name="Directives"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 <directive name="fastcgi_buffer_size"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 <syntax><value>size</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 <default>4k|8k</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 Sets <value>size</value> of the buffer used for reading the first part |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 of a response received from the FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 This part usually contains a small response header. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 By default, the buffer size is equal to the size of one |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 buffer set by the <link id="fastcgi_buffers"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 It can be made smaller however. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 <directive name="fastcgi_buffers"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 <syntax><value>number</value> <value>size</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 <default>8 4k|8k</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 Sets the <value>number</value> and <value>size</value> of |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 buffers used for reading a response from the FastCGI server, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 for a single connection. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 By default, the buffer size is equal to one memory page. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 This is either 4K or 8K, depending on a platform. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
84 <directive name="fastcgi_busy_buffers_size"> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
85 <syntax><value>size</value></syntax> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
86 <default>8k|16k</default> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
87 <context>http</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
88 <context>server</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
89 <context>location</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
90 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
91 <para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
92 Limits the total <value>size</value> of buffers that |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
93 can be busy sending a response to the client while the response is not |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
94 yet fully read. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
95 In the mean time, the rest of the buffers can be used for reading a response |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
96 and, if needed, buffering part of a response to a temporary file. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
97 By default, <value>size</value> is limited by two buffers set by the |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
98 <link id="fastcgi_buffer_size"/> and <link id="fastcgi_buffers"/> directives. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
99 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
100 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
101 </directive> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
102 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
103 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 <directive name="fastcgi_cache"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 <syntax><value>zone</value> | <literal>off</literal></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
110 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
111 <para> |
575
ebcb351d9eb3
Consistently using the term "shared memory zone".
Ruslan Ermilov <ru@nginx.com>
parents:
509
diff
changeset
|
112 Defines a shared memory zone used for caching. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 The same zone can be used in several places. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
114 The <literal>off</literal> parameter disables caching inherited |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 from the previous configuration level. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
118 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 <directive name="fastcgi_cache_bypass"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 <syntax><value>string</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
128 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 Defines conditions under which the response will not be taken from a cache. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 If at least one value of the string parameters is not empty and is not |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 equal to “0” then the response will not be taken from the cache: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 fastcgi_cache_bypass $cookie_nocache $arg_nocache$arg_comment; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
134 fastcgi_cache_bypass $http_pragma $http_authorization; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
136 Can be used along with the <link id="fastcgi_no_cache"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
137 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
140 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 <directive name="fastcgi_cache_key"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 <syntax><value>string</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
144 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
149 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 Defines a key for caching, for example |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
151 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
152 fastcgi_cache_key localhost:9000$request_uri; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
153 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
154 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
155 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
156 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
157 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
158 |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
159 <directive name="fastcgi_cache_lock"> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
160 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
161 <default>off</default> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
162 <context>http</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
163 <context>server</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
164 <context>location</context> |
310
86732337c730
Added a historical information for proxy_cache_lock, proxy_cache_lock_timeout,
Ruslan Ermilov <ru@nginx.com>
parents:
302
diff
changeset
|
165 <appeared-in>1.1.12</appeared-in> |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
166 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
167 <para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
168 When enabled, only one request at a time will be allowed to populate |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
169 a new cache element identified according to the <link id="fastcgi_cache_key"/> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
170 directive by passing a request to a FastCGI server. |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
171 Other requests of the same cache element will either wait |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
172 for a response to appear in the cache, or the cache lock for |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
173 this element to be released, up to the time set by the |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
174 <link id="fastcgi_cache_lock_timeout"/> directive. |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
175 </para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
176 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
177 </directive> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
178 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
179 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
180 <directive name="fastcgi_cache_lock_timeout"> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
181 <syntax><value>time</value></syntax> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
182 <default>5s</default> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
183 <context>http</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
184 <context>server</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
185 <context>location</context> |
310
86732337c730
Added a historical information for proxy_cache_lock, proxy_cache_lock_timeout,
Ruslan Ermilov <ru@nginx.com>
parents:
302
diff
changeset
|
186 <appeared-in>1.1.12</appeared-in> |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
187 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
188 <para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
189 Sets a timeout for <link id="fastcgi_cache_lock"/>. |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
190 </para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
191 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
192 </directive> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
193 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
194 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 <directive name="fastcgi_cache_min_uses"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
196 <syntax><value>number</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 <default>1</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
198 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
199 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
200 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
201 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
202 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
203 Sets the <value>number</value> of requests after which the response |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
204 will be cached. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
205 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
206 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
207 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
208 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
209 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 <directive name="fastcgi_cache_path"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
211 <syntax> |
364 | 212 <value>path</value> |
213 [<literal>levels</literal>=<value>levels</value>] | |
214 <literal>keys_zone</literal>=<value>name</value>:<value>size</value> | |
215 [<literal>inactive</literal>=<value>time</value>] | |
508
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
216 [<literal>max_size</literal>=<value>size</value>] |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
217 [<literal>loader_files</literal>=<value>number</value>] |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
218 [<literal>loader_sleep</literal>=<value>time</value>] |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
219 [<literal>loader_threshold</literal>=<value>time</value>]</syntax> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
220 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
221 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
222 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
223 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
224 Sets path and other parameters of a cache. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
225 Cache data are stored in files. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
226 Both the key and file name in a cache are a result of |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
227 applying the MD5 function to the proxied URL. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
228 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
229 The <literal>levels</literal> parameter defines hierarchy levels of a cache. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
230 For example, in the following configuration |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
231 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
232 fastcgi_cache_path /data/nginx/cache levels=1:2 keys_zone=one:10m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
233 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
234 file names in a cache will look like this: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
235 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
236 /data/nginx/cache/<emphasis>c</emphasis>/<emphasis>29</emphasis>/b7f54b2df7773722d382f4809d650<emphasis>29c</emphasis> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
237 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
238 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
239 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
240 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
241 A cached response is first written to a temporary file, then a file is renamed. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
242 Starting from version 0.8.9 temporary files and the cache can be put on |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
243 different file systems but be aware that in this case a file is copied |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
244 across two file systems instead of the cheap rename operation. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
245 It is thus recommended that for any given location both cache and a directory |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
246 holding temporary files set by the <link id="fastcgi_temp_path"/> directive |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
247 are put on the same file system. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
248 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
249 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
250 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
251 In addition, all active keys and information about data are stored |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
252 in a shared memory zone, whose <value>name</value> and <value>size</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
253 are configured by the <literal>keys_zone</literal> parameter. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
254 Cached data that are not accessed during the time specified by the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
255 <literal>inactive</literal> parameter get removed from the cache |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
256 regardless of their freshness. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
257 By default, <literal>inactive</literal> is set to 10 minutes. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
258 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
259 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
260 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
261 The special process “cache manager” monitors the maximum cache size set |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
262 by the <literal>max_size</literal> parameter; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
263 when this size is exceeded it removes the least recently used data. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
264 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
265 |
508
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
266 <para> |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
267 A minute after the start the special process “cache loader” is activated |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
268 that loads information about previously cached data stored on file system |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
269 into a cache zone. |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
270 A load is done in iterations. |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
271 During one iteration no more than <literal>loader_files</literal> items |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
272 are loaded (by default, 100). |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
273 Besides, the duration of one iteration is limited by the |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
274 <literal>loader_threshold</literal> parameter (by default, 200 milliseconds). |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
275 A pause is made between iterations, configured by the |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
276 <literal>loader_sleep</literal> parameter (by default, 50 milliseconds). |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
277 </para> |
5e332fafd228
Documented "cache loader" and its parameters.
Ruslan Ermilov <ru@nginx.com>
parents:
506
diff
changeset
|
278 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
279 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
280 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
281 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
282 <directive name="fastcgi_cache_use_stale"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
283 <syntax> |
364 | 284 <literal>error</literal> | |
285 <literal>timeout</literal> | | |
286 <literal>invalid_header</literal> | | |
287 <literal>updating</literal> | | |
288 <literal>http_500</literal> | | |
289 <literal>http_503</literal> | | |
290 <literal>http_404</literal> | | |
291 <literal>off</literal> | |
292 ...</syntax> | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
293 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
294 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
295 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
296 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
297 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
298 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
299 If an error occurs while working with the FastCGI server it is possible |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
300 to use a stale cached response. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
301 This directives determines in which cases it is permitted. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
302 The directive’s parameters match those of the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
303 <link id="fastcgi_next_upstream"/> directive. |
505
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
304 </para> |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
305 |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
306 <para> |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
307 Additionally, the <literal>updating</literal> parameter permits |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
308 to use a stale cached response if it is currently being updated. |
505
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
309 This allows to minimize the number of accesses to FastCGI servers |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
310 when updating cached data. |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
311 </para> |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
312 |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
313 <para> |
509 | 314 To minimize the number of accesses to FastCGI servers when |
505
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
315 populating a new cache element, the <link id="fastcgi_cache_lock"/> |
837bcf62b628
Emphasized on what the "updating" parameter of the "fastcgi_cache_use_stale"
Ruslan Ermilov <ru@nginx.com>
parents:
498
diff
changeset
|
316 directive can be used. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
317 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
318 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
319 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
320 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
321 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
322 <directive name="fastcgi_cache_valid"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
323 <syntax>[<value>code</value> ...] <value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
324 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
325 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
326 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
327 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
328 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
329 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
330 Sets caching time for different response codes. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
331 For example, the following directives |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
332 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
333 fastcgi_cache_valid 200 302 10m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
334 fastcgi_cache_valid 404 1m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
335 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
336 set 10 minutes of caching for responses with codes 200 and 302, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
337 and 1 minute for responses with code 404. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
338 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
339 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
340 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
341 If only caching <value>time</value> is specified |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
342 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
343 fastcgi_cache_valid 5m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
344 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
345 then only 200, 301, and 302 responses are cached. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
346 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
347 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
348 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
349 In addition, it can be specified to cache any responses using the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
350 <literal>any</literal> parameter: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
351 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
352 fastcgi_cache_valid 200 302 10m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
353 fastcgi_cache_valid 301 1h; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
354 fastcgi_cache_valid any 1m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
355 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
356 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
357 |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
358 <para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
359 Parameters of caching can also be set directly |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
360 in the response header. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
361 This has a higher precedence than setting of caching time using the directive. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
362 The <header>X-Accel-Expires</header> header field sets caching time of a |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
363 response in seconds. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
364 The value 0 disables to cache a response. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
365 If a value starts with the prefix <literal>@</literal>, it sets an absolute |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
366 time in seconds since Epoch, up to which the response may be cached. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
367 If header does not include the <header>X-Accel-Expires</header> field, |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
368 parameters of caching may be set in the header fields |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
369 <header>Expires</header> or <header>Cache-Control</header>. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
370 If a header includes the <header>Set-Cookie</header> field, such a |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
371 response will not be cached. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
372 Processing of one or more of these response header fields can be disabled |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
373 using the <link id="fastcgi_ignore_headers"/> directive. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
374 </para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
375 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
376 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
377 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
378 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
379 <directive name="fastcgi_connect_timeout"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
380 <syntax><value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
381 <default>60s</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
382 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
383 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
384 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
385 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
386 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
387 Defines a timeout for establishing a connection with the FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
388 It should be noted that this timeout cannot usually exceed 75 seconds. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
389 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
390 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
391 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
392 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
393 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
394 <directive name="fastcgi_hide_header"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
395 <syntax><value>field</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
396 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
397 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
398 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
399 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
400 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
401 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
402 By default, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
403 nginx does not pass the header fields <header>Status</header> and |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
404 <header>X-Accel-...</header> from the response of the FastCGI |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
405 server to a client. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
406 The <literal>fastcgi_hide_header</literal> directive sets additional fields |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
407 that will not be passed. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
408 If, on the contrary, the passing of fields needs to be permitted, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
409 the <link id="fastcgi_pass_header"/> directive can be used. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
410 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
411 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
412 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
413 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
414 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
415 <directive name="fastcgi_ignore_client_abort"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
416 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
417 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
418 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
419 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
420 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
421 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
422 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
423 Determines should the connection with the FastCGI server be |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
424 closed if a client closes a connection without waiting |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
425 for a response. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
426 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
427 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
428 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
429 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
430 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
431 <directive name="fastcgi_ignore_headers"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
432 <syntax><value>field</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
433 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
434 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
435 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
436 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
437 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
438 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
439 Disables processing of certain response header fields from the FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
440 The following fields can be ignored: <header>X-Accel-Redirect</header>, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
441 <header>X-Accel-Expires</header>, <header>X-Accel-Limit-Rate</header> (1.1.6), |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
442 <header>X-Accel-Buffering</header> (1.1.6), |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
443 <header>X-Accel-Charset</header> (1.1.6), <header>Expires</header>, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
444 <header>Cache-Control</header>, and <header>Set-Cookie</header> (0.8.44). |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
445 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
446 |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
447 <para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
448 If not disabled, processing of these header fields has the following effect: |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
449 <list type="bullet" compact="no"> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
450 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
451 <listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
452 <header>X-Accel-Expires</header>, <header>Expires</header>, |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
453 <header>Cache-Control</header>, and <header>Set-Cookie</header> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
454 set parameters of response <link id="fastcgi_cache_valid">caching</link>; |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
455 </listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
456 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
457 <listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
458 <header>X-Accel-Redirect</header> performs an |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
459 <link doc="ngx_http_core_module.xml" id="internal">internal |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
460 redirect</link> to the specified URI; |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
461 </listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
462 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
463 <listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
464 <header>X-Accel-Limit-Rate</header> sets a |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
465 <link doc="ngx_http_core_module.xml" id="limit_rate">rate |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
466 limit</link> for transmission of a response to a client; |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
467 </listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
468 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
469 <listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
470 <header>X-Accel-Buffering</header> enables or disables |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
471 buffering of a response; |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
472 </listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
473 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
474 <listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
475 <header>X-Accel-Charset</header> sets the desired |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
476 <link doc="ngx_http_charset_module.xml" id="charset"/> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
477 of a response. |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
478 </listitem> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
479 |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
480 </list> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
481 </para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
505
diff
changeset
|
482 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
483 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
484 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
485 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
486 <directive name="fastcgi_index"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
487 <syntax><value>name</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
488 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
489 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
490 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
491 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
492 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
493 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
494 Sets a file name that will be appended after a URI that ends with |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
495 a slash, in the value of the <var>$fastcgi_script_name</var> variable. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
496 For example, with these settings |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
497 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
498 fastcgi_index index.php; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
499 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
500 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
501 and the “<literal>/page.php</literal>” request, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
502 the <literal>SCRIPT_FILENAME</literal> parameter will be equal to |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
503 “<literal>/home/www/scripts/php/page.php</literal>”, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
504 and with the “<literal>/</literal>” request it will be equal to |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
505 “<literal>/home/www/scripts/php/index.php</literal>”. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
506 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
507 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
508 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
509 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
510 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
511 <directive name="fastcgi_intercept_errors"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
512 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
513 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
514 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
515 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
516 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
517 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
518 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
519 Determines whether FastCGI server responses with codes greater than or equal |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
520 to 400 should be passed to a client or be redirected to nginx for processing |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
521 using the <link doc="ngx_http_core_module.xml" id="error_page"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
522 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
523 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
524 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
525 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
526 |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
527 <directive name="fastcgi_keep_conn"> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
528 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
529 <default>off</default> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
530 <context>http</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
531 <context>server</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
532 <context>location</context> |
498
65843513cff5
Documented that "fastcgi_keep_conn" appeared in 1.1.4.
Ruslan Ermilov <ru@nginx.com>
parents:
411
diff
changeset
|
533 <appeared-in>1.1.4</appeared-in> |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
534 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
535 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
536 By default, a FastCGI server will close a connection right after |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
537 sending the response. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
538 When set to the value <literal>on</literal>, nginx will instruct |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
539 a FastCGI server to keep connections open. |
364 | 540 This in particular is necessary for |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
541 <link doc="ngx_http_upstream_module.xml" id="keepalive"/> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
542 connections to FastCGI servers to function. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
543 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
544 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
545 </directive> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
546 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
547 |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
548 <directive name="fastcgi_max_temp_file_size"> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
549 <syntax><value>size</value></syntax> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
550 <default>1024m</default> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
551 <context>http</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
552 <context>server</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
553 <context>location</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
554 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
555 <para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
556 When the whole response does not fit into memory buffers |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
557 set by the <link id="fastcgi_buffer_size"/> and <link id="fastcgi_buffers"/> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
558 directives, part of a response can be saved to a temporary file. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
559 This directive sets the maximum <value>size</value> of a temporary file. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
560 The size of data written to a temporary file at a time is set |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
561 by the <link id="fastcgi_temp_file_write_size"/> directive. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
562 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
563 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
564 <para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
565 Value of zero disables buffering of responses to temporary files. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
566 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
567 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
568 </directive> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
569 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
570 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
571 <directive name="fastcgi_next_upstream"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
572 <syntax> |
364 | 573 <literal>error</literal> | |
574 <literal>timeout</literal> | | |
575 <literal>invalid_header</literal> | | |
576 <literal>http_500</literal> | | |
577 <literal>http_503</literal> | | |
578 <literal>http_404</literal> | | |
579 <literal>off</literal> | |
580 ...</syntax> | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
581 <default>error timeout</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
582 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
583 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
584 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
585 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
586 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
587 Specifies in which cases a request should be passed to the next server: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
588 <list type="tag"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
589 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
590 <tag-name><literal>error</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
591 <tag-desc>an error occurred while establishing a connection with the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
592 server, passing it a request, or reading the response header;</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
593 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
594 <tag-name><literal>timeout</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
595 <tag-desc>a timeout has occurred while establishing a connection with the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
596 server, passing it a request, or reading the response header;</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
597 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
598 <tag-name><literal>invalid_header</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
599 <tag-desc>a server returned empty or invalid response;</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
600 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
601 <tag-name><literal>http_500</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
602 <tag-desc>a server returned a response with the code 500;</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
603 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
604 <tag-name><literal>http_503</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
605 <tag-desc>a server returned a response with the code 503;</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
606 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
607 <tag-name><literal>http_404</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
608 <tag-desc>a server returned a response with the code 404;</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
609 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
610 <tag-name><literal>off</literal></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
611 <tag-desc>disables passing a request to the next server.</tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
612 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
613 </list> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
614 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
615 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
616 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
617 It should be understood that passing a request to the next server is |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
618 only possible if a client was not sent anything yet. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
619 That is, if an error or a timeout occurs in the middle of |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
620 transferring a response, fixing this is impossible. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
621 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
622 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
623 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
624 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
625 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
626 <directive name="fastcgi_no_cache"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
627 <syntax><value>string</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
628 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
629 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
630 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
631 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
632 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
633 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
634 Defines conditions under which the response will not be saved to a cache. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
635 If at least one value of the string parameters is not empty and is not |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
636 equal to “0” then the response will not be saved: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
637 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
638 fastcgi_no_cache $cookie_nocache $arg_nocache$arg_comment; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
639 fastcgi_no_cache $http_pragma $http_authorization; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
640 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
641 Can be used along with the <link id="fastcgi_cache_bypass"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
642 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
643 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
644 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
645 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
646 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
647 <directive name="fastcgi_param"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
648 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
649 <value>parameter</value> <value>value</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
650 [<literal>if_not_empty</literal>]</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
651 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
652 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
653 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
654 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
655 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
656 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
657 Sets a <value>parameter</value> that should be passed to the FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
658 A <value>value</value> can contain text, variables, and their combination. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
659 These directives are inherited from the previous level if and |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
660 only if there are no |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
661 <literal>fastcgi_param</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
662 directives defined on the current level. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
663 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
664 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
665 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
666 The following example shows the minimum required settings for PHP: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
667 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
668 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
669 fastcgi_param QUERY_STRING $query_string; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
670 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
671 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
672 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
673 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
674 The <literal>SCRIPT_FILENAME</literal> parameter is used in PHP for |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
675 determining the script name, and the <literal>QUERY_STRING</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
676 parameter is used to pass request parameters. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
677 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
678 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
679 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
680 For scripts that process <literal>POST</literal> requests, the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
681 following three parameters are also required: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
682 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
683 fastcgi_param REQUEST_METHOD $request_method; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
684 fastcgi_param CONTENT_TYPE $content_type; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
685 fastcgi_param CONTENT_LENGTH $content_length; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
686 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
687 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
688 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
689 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
690 If PHP was built with the <literal>--enable-force-cgi-redirect</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
691 configuration parameter, the <literal>REDIRECT_STATUS</literal> parameter |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
692 should also be passed with the value “200”: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
693 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
694 fastcgi_param REDIRECT_STATUS 200; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
695 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
696 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
697 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
698 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
699 If a directive is specified with <literal>if_not_empty</literal> (1.1.11) then |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
700 such a parameter will not be passed to the server until its value is not empty: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
701 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
702 fastcgi_param HTTPS $https if_not_empty; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
703 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
704 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
705 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
706 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
707 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
708 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
709 <directive name="fastcgi_pass"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
710 <syntax><value>address</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
711 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
712 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
713 <context>if in location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
714 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
715 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
716 Sets an address of the FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
717 An address can be specified as a domain name or an address, and a port, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
718 for example, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
719 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
316
diff
changeset
|
720 fastcgi_pass localhost:9000; |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
721 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
722 or as a UNIX-domain socket path: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
723 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
316
diff
changeset
|
724 fastcgi_pass unix:/tmp/fastcgi.socket; |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
725 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
726 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
727 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
728 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
729 If a domain name resolves to several addresses, all of them will be |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
730 used in a round-robin fashion. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
731 In addition, an address can be specified as a |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
732 <link doc="ngx_http_upstream_module.xml">server group</link>. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
733 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
734 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
735 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
736 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
737 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
738 <directive name="fastcgi_pass_header"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
739 <syntax><value>field</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
740 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
741 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
742 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
743 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
744 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
745 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
746 Permits to pass <link id="fastcgi_hide_header">otherwise disabled</link> header |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
747 fields from the FastCGI server to a client. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
748 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
749 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
750 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
751 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
752 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
753 <directive name="fastcgi_read_timeout"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
754 <syntax><value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
755 <default>60s</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
756 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
757 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
758 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
759 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
760 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
761 Defines a timeout for reading a response from the FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
762 A timeout is only set between two successive read operations, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
763 not for the transmission of the whole response. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
764 If a FastCGI server does not transmit anything within this time, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
765 a connection is closed. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
766 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
767 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
768 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
769 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
770 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
771 <directive name="fastcgi_send_timeout"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
772 <syntax><value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
773 <default>60s</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
774 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
775 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
776 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
777 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
778 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
779 Sets a timeout for transmitting a request to the FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
780 A timeout is only set between two successive write operations, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
781 not for the transmission of the whole request. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
782 If a FastCGI server does not receive anything within this time, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
783 a connection is closed. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
784 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
785 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
786 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
787 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
788 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
789 <directive name="fastcgi_split_path_info"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
790 <syntax><value>regex</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
791 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
792 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
793 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
794 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
795 Defines a regular expression that captures a value for the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
796 <var>$fastcgi_path_info</var> variable. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
797 A regular expression should have two captures, the first becomes |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
798 a value of the <var>$fastcgi_script_name</var> variable, the second |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
799 becomes a value of the <var>$fastcgi_path_info</var> variable. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
800 For example, with these settings |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
801 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
802 location ~ ^(.+\.php)(.*)$ { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
803 fastcgi_split_path_info ^(.+\.php)(.*)$; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
804 fastcgi_param SCRIPT_FILENAME /path/to/php$fastcgi_script_name; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
805 fastcgi_param PATH_INFO $fastcgi_path_info; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
806 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
807 and the “<literal>/show.php/article/0001</literal>” request, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
808 the <literal>SCRIPT_FILENAME</literal> parameter will be equal to |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
809 “<literal>/path/to/php/show.php</literal>”, and the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
810 <literal>PATH_INFO</literal> parameter will be equal to |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
811 “<literal>/article/0001</literal>”. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
812 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
813 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
814 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
815 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
816 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
817 <directive name="fastcgi_store"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
818 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
819 <literal>on</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
820 <literal>off</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
821 <value>string</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
822 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
823 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
824 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
825 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
826 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
827 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
828 Enables saving of files to a disk. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
829 The <literal>on</literal> parameter saves files with paths |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
830 corresponding to the directives |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
831 <link doc="ngx_http_core_module.xml" id="alias"/> or |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
832 <link doc="ngx_http_core_module.xml" id="root"/>. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
833 The <literal>off</literal> parameter disables saving of files. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
834 In addition, the file name can be set explicitly using the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
835 <value>string</value> with variables: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
836 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
837 fastcgi_store /data/www$original_uri; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
838 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
839 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
840 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
841 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
842 The modification time of files is set according to the received |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
843 <header>Last-Modified</header> response header field. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
844 A response is first written to a temporary file, then a file is renamed. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
845 Starting from version 0.8.9 temporary files and the persistent store |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
846 can be put on different file systems but be aware that in this case |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
847 a file is copied across two file systems instead of the cheap rename operation. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
848 It is thus recommended that for any given location both saved files and a |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
849 directory holding temporary files set by the <link id="fastcgi_temp_path"/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
850 directive are put on the same file system. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
851 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
852 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
853 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
854 This directive can be used to create local copies of static unchangeable |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
855 files, e.g.: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
856 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
857 location /images/ { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
858 root /data/www; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
859 open_file_cache_errors off; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
860 error_page 404 = /fetch$uri; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
861 } |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
862 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
863 location /fetch/ { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
864 internal; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
865 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
866 fastcgi_pass backend:9000; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
867 ... |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
868 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
869 fastcgi_store on; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
870 fastcgi_store_access user:rw group:rw all:r; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
871 fastcgi_temp_path /data/temp; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
872 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
873 alias /data/www/; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
874 } |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
875 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
876 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
877 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
878 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
879 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
880 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
881 <directive name="fastcgi_store_access"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
882 <syntax><value>users</value>:<value>permissions</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
883 <default>user:rw</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
884 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
885 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
886 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
887 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
888 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
889 Sets access permissions for newly created files and directories, e.g.: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
890 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
891 fastcgi_store_access user:rw group:rw all:r; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
892 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
893 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
894 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
895 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
896 If any <literal>group</literal> or <literal>all</literal> access permissions |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
897 are specified then <literal>user</literal> permissions may be omitted: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
898 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
899 fastcgi_store_access group:rw all:r; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
900 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
901 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
902 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
903 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
904 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
905 |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
906 <directive name="fastcgi_temp_file_write_size"> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
907 <syntax><value>size</value></syntax> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
908 <default>8k|16k</default> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
909 <context>http</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
910 <context>server</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
911 <context>location</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
912 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
913 <para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
914 Limits the <value>size</value> of data written to a temporary file |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
915 at a time, when buffering of responses from the FastCGI server |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
916 to temporary files is enabled. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
917 By default, <value>size</value> is limited by two buffers set by the |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
918 <link id="fastcgi_buffer_size"/> and <link id="fastcgi_buffers"/> directives. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
919 The maximum size of a temporary file is set by the |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
920 <link id="fastcgi_max_temp_file_size"/> directive. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
921 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
922 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
923 </directive> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
924 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
925 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
926 <directive name="fastcgi_temp_path"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
927 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
928 <value>path</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
929 [<value>level1</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
930 [<value>level2</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
931 [<value>level3</value>]]]</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
932 <default>fastcgi_temp</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
933 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
934 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
935 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
936 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
937 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
938 Defines a directory for storing temporary files |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
939 with data received from FastCGI servers. |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
940 Up to three-level subdirectory hierarchy can be used underneath the specified |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
941 directory. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
942 For example, in the following configuration |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
943 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
944 fastcgi_temp_path /spool/nginx/fastcgi_temp 1 2; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
945 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
946 a temporary file might look like this: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
947 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
948 /spool/nginx/fastcgi_temp/<emphasis>7</emphasis>/<emphasis>45</emphasis>/00000123<emphasis>457</emphasis> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
949 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
950 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
951 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
952 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
953 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
954 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
955 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
956 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
957 <section id="parameters" name="Parameters Passed to a FastCGI Server"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
958 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
959 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
960 HTTP request header fields are passed to the FastCGI server as parameters. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
961 In applications and scripts running as FastCGI servers, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
962 these parameters are usually made available as environment variables. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
963 For example, the <header>User-Agent</header> header field is passed as the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
964 <literal>HTTP_USER_AGENT</literal> parameter. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
965 In addition to HTTP request header fields it is possible to pass arbitrary |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
966 parameters using the <link id="fastcgi_param"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
967 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
968 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
969 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
970 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
971 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
972 <section id="variables" name="Embedded Variables"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
973 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
974 <para> |
364 | 975 The <literal>ngx_http_fastcgi_module</literal> module supports embedded |
976 variables that can be used to set parameters using the | |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
977 <link id="fastcgi_param"/> directive: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
978 <list type="tag"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
979 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
980 <tag-name><var>$fastcgi_script_name</var></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
981 <tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
982 request URI or, if a URI ends with a slash, request URI with an index file |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
983 name configured by the <link id="fastcgi_index"/> directive appended to it. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
984 This variable can be used to set the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
985 <literal>SCRIPT_FILENAME</literal> and <literal>PATH_TRANSLATED</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
986 parameters that determine the script name in PHP. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
987 For example, for the “<literal>/info/</literal>” request with the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
988 following directives |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
989 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
990 fastcgi_index index.php; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
991 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
992 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
993 the <literal>SCRIPT_FILENAME</literal> parameter will be equal to |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
994 “<literal>/home/www/scripts/php/info/index.php</literal>”. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
995 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
996 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
997 When using the <link id="fastcgi_split_path_info"/> directive, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
998 the <var>$fastcgi_script_name</var> variable equals to the value of |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
999 the first capture set by the directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1000 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1001 </tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1002 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1003 <tag-name><var>$fastcgi_path_info</var></tag-name> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1004 <tag-desc>the value of the second capture set by the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1005 <link id="fastcgi_split_path_info"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1006 This variable can be used to set the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1007 <literal>PATH_INFO</literal> parameter. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1008 </tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1009 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1010 </list> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1011 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1012 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1013 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1014 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1015 </module> |