Mercurial > hg > nginx-site
annotate xml/en/docs/http/ngx_http_fastcgi_module.xml @ 351:a4fa80755eab
Consistently strip initial offset in examples.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 24 Jan 2012 11:01:22 +0000 |
parents | 1fb1c077658b |
children | bb51d3e17dd0 |
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 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <!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
|
4 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 <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
|
6 link="/en/docs/http/ngx_http_fastcgi_module.html" |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 lang="en"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 <section id="summary"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
12 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
|
13 requests to a FastCGI server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 <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
|
20 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 location / { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 fastcgi_pass localhost:9000; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 fastcgi_index index.php; |
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 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
|
28 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
|
29 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
|
30 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
|
31 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
|
32 } |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 |
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 <section id="directives" name="Directives"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 <directive name="fastcgi_buffer_size"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 <syntax><value>size</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 <default>4k|8k</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 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
|
50 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
|
51 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
|
52 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
|
53 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
|
54 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
|
55 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 <directive name="fastcgi_buffers"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 <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
|
62 <default>8 4k|8k</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 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
|
69 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
|
70 for a single connection. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 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
|
72 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
|
73 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 <directive name="fastcgi_cache"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 <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
|
80 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 Defines a zone used for caching. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 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
|
88 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
|
89 from the previous configuration level. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 <directive name="fastcgi_cache_bypass"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 <syntax><value>string</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 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
|
104 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
|
105 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
|
106 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 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
|
108 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
|
109 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
110 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
|
111 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
112 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
114 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 <directive name="fastcgi_cache_key"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 <syntax><value>string</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
118 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 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
|
125 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 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
|
127 </example> |
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 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
133 <directive name="fastcgi_cache_lock"> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
134 <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
|
135 <default>off</default> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
136 <context>http</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
137 <context>server</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
138 <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
|
139 <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
|
140 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
141 <para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
142 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
|
143 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
|
144 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
|
145 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
|
146 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
|
147 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
|
148 <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
|
149 </para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
150 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
151 </directive> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
152 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
153 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
154 <directive name="fastcgi_cache_lock_timeout"> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
155 <syntax><value>time</value></syntax> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
156 <default>5s</default> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
157 <context>http</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
158 <context>server</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
159 <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
|
160 <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
|
161 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
162 <para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
163 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
|
164 </para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
165 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
166 </directive> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
167 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
298
diff
changeset
|
168 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
169 <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
|
170 <syntax><value>number</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
171 <default>1</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
172 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
173 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
174 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
175 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
176 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
177 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
|
178 will be cached. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
179 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
180 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
181 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
182 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
183 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
184 <directive name="fastcgi_cache_path"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
185 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
186 <value>path</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
187 [<literal>levels</literal>=<value>levels</value>] |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
188 <literal>keys_zone</literal>=<value>name</value>:<value>size</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
189 [<literal>inactive</literal>=<value>time</value>] |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
190 [<literal>max_size</literal>=<value>size</value>]</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
191 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
192 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
193 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 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
|
196 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
|
197 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
|
198 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
|
199 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
200 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
|
201 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
|
202 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
203 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
|
204 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
205 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
|
206 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
207 /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
|
208 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
209 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
211 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
212 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
|
213 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
|
214 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
|
215 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
|
216 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
|
217 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
|
218 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
|
219 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
220 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
221 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
222 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
|
223 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
|
224 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
|
225 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
|
226 <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
|
227 regardless of their freshness. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
228 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
|
229 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
230 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
231 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
232 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
|
233 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
|
234 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
|
235 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
236 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
237 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
238 |
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 <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
|
241 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
242 <literal>error</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
243 <literal>timeout</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
244 <literal>invalid_header</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
245 <literal>updating</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
246 <literal>http_500</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
247 <literal>http_503</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
248 <literal>http_404</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
249 <literal>off</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
250 ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
251 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
252 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
253 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
254 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
255 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
256 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
257 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
|
258 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
|
259 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
|
260 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
|
261 <link id="fastcgi_next_upstream"/> directive. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
262 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
|
263 to use a stale cached response if it is currently being updated. |
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 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
266 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
267 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
268 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
269 <directive name="fastcgi_cache_valid"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
270 <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
|
271 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
272 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
273 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
274 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
275 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
276 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
277 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
|
278 For example, the following directives |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
279 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
280 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
|
281 fastcgi_cache_valid 404 1m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
282 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
283 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
|
284 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
|
285 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
286 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
287 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
288 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
|
289 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
290 fastcgi_cache_valid 5m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
291 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
292 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
|
293 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
294 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
295 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
296 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
|
297 <literal>any</literal> parameter: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
298 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
299 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
|
300 fastcgi_cache_valid 301 1h; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
301 fastcgi_cache_valid any 1m; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
302 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
303 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
304 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
305 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
306 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
307 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
308 <directive name="fastcgi_connect_timeout"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
309 <syntax><value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
310 <default>60s</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
311 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
312 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
313 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
314 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
315 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
316 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
|
317 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
|
318 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
319 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
320 </directive> |
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 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
323 <directive name="fastcgi_hide_header"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
324 <syntax><value>field</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
325 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
326 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
327 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
328 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
329 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
330 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
331 By default, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
332 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
|
333 <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
|
334 server to a client. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
335 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
|
336 that will not be passed. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
337 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
|
338 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
|
339 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
340 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
341 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
342 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
343 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
344 <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
|
345 <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
|
346 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
347 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
348 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
349 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
350 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
351 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
352 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
|
353 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
|
354 for a response. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
355 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
356 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
357 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
358 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
359 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
360 <directive name="fastcgi_ignore_headers"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
361 <syntax><value>field</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
362 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
363 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
364 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
365 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
366 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
367 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
368 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
|
369 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
|
370 <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
|
371 <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
|
372 <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
|
373 <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
|
374 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
375 |
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_index"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
380 <syntax><value>name</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
381 <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 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
|
388 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
|
389 For example, with these settings |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
390 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
391 fastcgi_index index.php; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
392 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
|
393 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
394 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
|
395 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
|
396 “<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
|
397 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
|
398 “<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
|
399 </para> |
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 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
402 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
403 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
404 <directive name="fastcgi_intercept_errors"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
405 <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
|
406 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
407 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
408 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
409 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
410 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
411 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
412 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
|
413 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
|
414 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
|
415 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
416 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
417 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
418 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
419 |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
420 <directive name="fastcgi_keep_conn"> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
421 <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
|
422 <default>off</default> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
423 <context>http</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
424 <context>server</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
425 <context>location</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
426 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
427 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
428 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
|
429 sending the response. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
430 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
|
431 a FastCGI server to keep connections open. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
432 This in particular is necessary for |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
433 <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
|
434 connections to FastCGI servers to function. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
435 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
436 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
437 </directive> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
438 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
439 |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
440 <directive name="fastcgi_next_upstream"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
441 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
442 <literal>error</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
443 <literal>timeout</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
444 <literal>invalid_header</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
445 <literal>http_500</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
446 <literal>http_503</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
447 <literal>http_404</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
448 <literal>off</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
449 ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
450 <default>error timeout</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
451 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
452 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
453 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
454 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
455 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
456 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
|
457 <list type="tag"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
458 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
459 <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
|
460 <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
|
461 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
|
462 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
463 <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
|
464 <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
|
465 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
|
466 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
467 <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
|
468 <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
|
469 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
470 <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
|
471 <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
|
472 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
473 <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
|
474 <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
|
475 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
476 <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
|
477 <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
|
478 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
479 <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
|
480 <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
|
481 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
482 </list> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
483 </para> |
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 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
486 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
|
487 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
|
488 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
|
489 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
|
490 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
491 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
492 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
493 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
494 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
495 <directive name="fastcgi_no_cache"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
496 <syntax><value>string</value> ...</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
497 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
498 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
499 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
500 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
501 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
502 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
503 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
|
504 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
|
505 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
|
506 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
507 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
|
508 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
|
509 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
510 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
|
511 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
512 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
513 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
514 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
515 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
516 <directive name="fastcgi_param"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
517 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
518 <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
|
519 [<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
|
520 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
521 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
522 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
523 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
524 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
525 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
526 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
|
527 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
|
528 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
|
529 only if there are no |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
530 <literal>fastcgi_param</literal> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
531 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
|
532 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
533 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
534 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
535 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
|
536 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
537 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
|
538 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
|
539 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
540 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
541 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
542 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
543 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
|
544 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
|
545 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
|
546 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
547 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
548 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
549 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
|
550 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
|
551 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
552 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
|
553 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
|
554 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
|
555 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
556 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
557 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
558 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
559 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
|
560 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
|
561 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
|
562 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
563 fastcgi_param REDIRECT_STATUS 200; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
564 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
565 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
566 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
567 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
568 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
|
569 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
|
570 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
571 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
|
572 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
573 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
574 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
575 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
576 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
577 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
578 <directive name="fastcgi_pass"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
579 <syntax><value>address</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
580 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
581 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
582 <context>if in location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
583 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
584 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
585 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
|
586 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
|
587 for example, |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
588 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
316
diff
changeset
|
589 fastcgi_pass localhost:9000; |
298
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
590 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
591 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
|
592 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
316
diff
changeset
|
593 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
|
594 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
595 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
596 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
597 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
598 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
|
599 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
|
600 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
|
601 <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
|
602 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
603 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
604 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
605 |
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 <directive name="fastcgi_pass_header"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
608 <syntax><value>field</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
609 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
610 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
611 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
612 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
613 |
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 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
|
616 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
|
617 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
618 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
619 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
620 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
621 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
622 <directive name="fastcgi_read_timeout"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
623 <syntax><value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
624 <default>60s</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
625 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
626 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
627 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
628 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
629 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
630 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
|
631 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
|
632 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
|
633 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
|
634 a connection is closed. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
635 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
636 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
637 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
638 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
639 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
640 <directive name="fastcgi_send_timeout"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
641 <syntax><value>time</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
642 <default>60s</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
643 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
644 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
645 <context>location</context> |
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 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
648 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
|
649 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
|
650 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
|
651 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
|
652 a connection is closed. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
653 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
654 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
655 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
656 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
657 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
658 <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
|
659 <syntax><value>regex</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
660 <default/> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
661 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
662 |
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 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
|
665 <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
|
666 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
|
667 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
|
668 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
|
669 For example, with these settings |
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 location ~ ^(.+\.php)(.*)$ { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
672 fastcgi_split_path_info ^(.+\.php)(.*)$; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
673 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
|
674 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
|
675 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
676 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
|
677 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
|
678 “<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
|
679 <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
|
680 “<literal>/article/0001</literal>”. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
681 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
682 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
683 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
684 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
685 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
686 <directive name="fastcgi_store"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
687 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
688 <literal>on</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
689 <literal>off</literal> | |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
690 <value>string</value></syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
691 <default>off</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
692 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
693 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
694 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
695 |
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 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
|
698 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
|
699 corresponding to the directives |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
700 <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
|
701 <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
|
702 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
|
703 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
|
704 <value>string</value> with variables: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
705 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
706 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
|
707 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
708 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
709 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
710 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
711 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
|
712 <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
|
713 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
|
714 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
|
715 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
|
716 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
|
717 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
|
718 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
|
719 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
|
720 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
721 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
722 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
723 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
|
724 files, e.g.: |
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 location /images/ { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
727 root /data/www; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
728 open_file_cache_errors off; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
729 error_page 404 = /fetch$uri; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
730 } |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
731 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
732 location /fetch/ { |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
733 internal; |
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 fastcgi_pass backend:9000; |
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 fastcgi_store on; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
739 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
|
740 fastcgi_temp_path /data/temp; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
741 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
742 alias /data/www/; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
743 } |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
744 </example> |
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 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
747 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
748 |
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 name="fastcgi_store_access"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
751 <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
|
752 <default>user:rw</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
753 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
754 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
755 <context>location</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
756 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
757 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
758 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
|
759 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
760 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
|
761 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
762 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
763 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
764 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
765 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
|
766 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
|
767 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
768 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
|
769 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
770 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
771 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
772 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
773 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
774 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
775 <directive name="fastcgi_temp_path"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
776 <syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
777 <value>path</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
778 [<value>level1</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
779 [<value>level2</value> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
780 [<value>level3</value>]]]</syntax> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
781 <default>fastcgi_temp</default> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
782 <context>http</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
783 <context>server</context> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
784 <context>location</context> |
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 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
787 Defines a directory for storing temporary files |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
788 received from another server. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
789 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
|
790 directory. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
791 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
|
792 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
793 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
|
794 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
795 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
|
796 <example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
797 /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
|
798 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
799 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
800 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
801 </directive> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
802 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
803 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
804 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
805 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
806 <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
|
807 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
808 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
809 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
|
810 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
|
811 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
|
812 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
|
813 <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
|
814 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
|
815 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
|
816 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
817 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
818 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
819 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
820 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
821 <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
|
822 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
823 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
824 The <literal>ngx_http_fastcgi_module</literal> module supports embedded variables |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
825 that can be used to set parameters using the |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
826 <link id="fastcgi_param"/> directive: |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
827 <list type="tag"> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
828 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
829 <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
|
830 <tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
831 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
|
832 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
|
833 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
|
834 <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
|
835 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
|
836 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
|
837 following directives |
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 fastcgi_index index.php; |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
840 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
|
841 </example> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
842 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
|
843 “<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
|
844 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
845 <para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
846 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
|
847 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
|
848 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
|
849 </para> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
850 </tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
851 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
852 <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
|
853 <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
|
854 <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
|
855 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
|
856 <literal>PATH_INFO</literal> parameter. |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
857 </tag-desc> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
858 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
859 </list> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
860 </para> |
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 </section> |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
863 |
0dcf07c393b6
English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
864 </module> |