annotate xml/en/docs/http/ngx_http_fastcgi_module.xml @ 298:0dcf07c393b6

English translation of the ngx_http_fastcgi_module module documentation.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 29 Dec 2011 07:56:40 +0000
parents
children df728215db07
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
133 <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
134 <syntax><value>number</value></syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
135 <default>1</default>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
136 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
137 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
138 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
139
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
140 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
141 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
142 will be cached.
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
143 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
144
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
145 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
146
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
147
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
148 <directive name="fastcgi_cache_path">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
149 <syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
150 <value>path</value>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
151 [<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
152 <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
153 [<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
154 [<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
155 <default/>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
156 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
157
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
158 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
159 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
160 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
161 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
162 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
163
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
164 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
165 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
166 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
167 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
168 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
169 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
170 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
171 /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
172 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
173 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
174
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
175 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
176 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
177 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
178 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
179 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
180 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
181 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
182 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
183 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
184
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
185 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
186 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
187 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
188 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
189 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
190 <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
191 regardless of their freshness.
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
192 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
193 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
194
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
195 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
196 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
197 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
198 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
199 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
200
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
201 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
202
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
203
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
204 <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
205 <syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
206 <literal>error</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
207 <literal>timeout</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
208 <literal>invalid_header</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
209 <literal>updating</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
210 <literal>http_500</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
211 <literal>http_503</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
212 <literal>http_404</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
213 <literal>off</literal>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
214 ...</syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
215 <default>off</default>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
216 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
217 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
218 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
219
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
220 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
221 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
222 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
223 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
224 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
225 <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
226 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
227 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
228 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
229
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
230 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
231
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
232
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
233 <directive name="fastcgi_cache_valid">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
234 <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
235 <default/>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
236 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
237 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
238 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
239
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
240 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
241 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
242 For example, the following directives
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
243 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
244 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
245 fastcgi_cache_valid 404 1m;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
246 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
247 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
248 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
249 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
250
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
251 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
252 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
253 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
254 fastcgi_cache_valid 5m;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
255 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
256 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
257 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
258
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
259 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
260 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
261 <literal>any</literal> parameter:
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
262 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
263 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
264 fastcgi_cache_valid 301 1h;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
265 fastcgi_cache_valid any 1m;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
266 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
267 </para>
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>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
270
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
271
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
272 <directive name="fastcgi_connect_timeout">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
273 <syntax><value>time</value></syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
274 <default>60s</default>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
275 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
276 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
277 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
278
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
279 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
280 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
281 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
282 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
283
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
284 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
285
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 <directive name="fastcgi_hide_header">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
288 <syntax><value>field</value></syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
289 <default/>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
290 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
291 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
292 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
293
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
294 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
295 By default,
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
296 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
297 <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
298 server to a client.
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
299 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
300 that will not be passed.
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
301 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
302 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
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_ignore_client_abort">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
309 <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
310 <default>off</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 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
317 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
318 for a response.
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
319 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
320
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
321 </directive>
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
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
324 <directive name="fastcgi_ignore_headers">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
325 <syntax><value>field</value> ...</syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
326 <default/>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
327 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
328 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
329 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
330
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
331 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
332 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
333 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
334 <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
335 <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
336 <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
337 <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
338 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
339
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
340 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
341
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 <directive name="fastcgi_index">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
344 <syntax><value>name</value></syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
345 <default/>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
346 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
347 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
348 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
349
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
350 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
351 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
352 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
353 For example, with these settings
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
354 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
355 fastcgi_index index.php;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
356 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
357 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
358 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
359 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
360 “<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
361 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
362 “<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
363 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
364
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
365 </directive>
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
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
368 <directive name="fastcgi_intercept_errors">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
369 <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
370 <default>off</default>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
371 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
372 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
373 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
374
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
375 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
376 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
377 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
378 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
379 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
380
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
381 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
382
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
383
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
384 <directive name="fastcgi_next_upstream">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
385 <syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
386 <literal>error</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
387 <literal>timeout</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
388 <literal>invalid_header</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
389 <literal>http_500</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
390 <literal>http_503</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
391 <literal>http_404</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
392 <literal>off</literal>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
393 ...</syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
394 <default>error timeout</default>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
395 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
396 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
397 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
398
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 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
401 <list type="tag">
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 <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
404 <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
405 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
406
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
407 <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
408 <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
409 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
410
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
411 <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
412 <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
413
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
414 <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
415 <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
416
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
417 <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
418 <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
419
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
420 <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
421 <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
422
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
423 <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
424 <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
425
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
426 </list>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
427 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
428
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
429 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
430 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
431 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
432 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
433 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
434 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
435
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
436 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
437
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
438
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
439 <directive name="fastcgi_no_cache">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
440 <syntax><value>string</value> ...</syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
441 <default/>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
442 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
443 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
444 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
445
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
446 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
447 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
448 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
449 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
450 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
451 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
452 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
453 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
454 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
455 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
456
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
457 </directive>
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
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
460 <directive name="fastcgi_param">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
461 <syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
462 <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
463 [<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
464 <default/>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
465 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
466 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
467 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
468
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
469 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
470 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
471 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
472 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
473 only if there are no
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
474 <literal>fastcgi_param</literal>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
475 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
476 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
477
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
478 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
479 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
480 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
481 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
482 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
483 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
484 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
485
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
486 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
487 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
488 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
489 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
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 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
493 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
494 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
495 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
496 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
497 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
498 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
499 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
500 </para>
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 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
504 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
505 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
506 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
507 fastcgi_param REDIRECT_STATUS 200;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
508 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
509 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
510
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
511 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
512 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
513 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
514 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
515 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
516 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
517 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
518
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
519 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
520
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
521
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
522 <directive name="fastcgi_pass">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
523 <syntax><value>address</value></syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
524 <default/>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
525 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
526 <context>if in location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
527
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
528 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
529 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
530 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
531 for example,
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
532 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
533 fastcgi_pass localhost:9000;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
534 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
535 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
536 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
537 fastcgi_pass unix:/tmp/fastcgi.socket;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
538 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
539 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
540
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
541 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
542 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
543 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
544 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
545 <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
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 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
549
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
550
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
551 <directive name="fastcgi_pass_header">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
552 <syntax><value>field</value></syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
553 <default/>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
554 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
555 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
556 <context>location</context>
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 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
560 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
561 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
562
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
563 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
564
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
565
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
566 <directive name="fastcgi_read_timeout">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
567 <syntax><value>time</value></syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
568 <default>60s</default>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
569 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
570 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
571 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
572
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 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
575 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
576 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
577 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
578 a connection is closed.
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
579 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
580
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
581 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
582
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
583
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
584 <directive name="fastcgi_send_timeout">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
585 <syntax><value>time</value></syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
586 <default>60s</default>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
587 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
588 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
589 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
590
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
591 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
592 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
593 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
594 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
595 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
596 a connection is closed.
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
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
599 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
600
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
601
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
602 <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
603 <syntax><value>regex</value></syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
604 <default/>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
605 <context>location</context>
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 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
608 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
609 <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
610 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
611 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
612 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
613 For example, with these settings
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
614 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
615 location ~ ^(.+\.php)(.*)$ {
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
616 fastcgi_split_path_info ^(.+\.php)(.*)$;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
617 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
618 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
619 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
620 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
621 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
622 “<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
623 <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
624 “<literal>/article/0001</literal>”.
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
625 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
626
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
627 </directive>
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
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
630 <directive name="fastcgi_store">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
631 <syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
632 <literal>on</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
633 <literal>off</literal> |
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
634 <value>string</value></syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
635 <default>off</default>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
636 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
637 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
638 <context>location</context>
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 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
641 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
642 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
643 corresponding to the directives
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
644 <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
645 <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
646 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
647 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
648 <value>string</value> with variables:
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
649 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
650 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
651 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
652 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
653
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
654 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
655 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
656 <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
657 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
658 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
659 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
660 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
661 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
662 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
663 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
664 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
665
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
666 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
667 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
668 files, e.g.:
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
669 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
670 location /images/ {
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
671 root /data/www;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
672 open_file_cache_errors off;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
673 error_page 404 = /fetch$uri;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
674 }
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
675
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
676 location /fetch/ {
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
677 internal;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
678
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
679 fastcgi_pass backend:9000;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
680 ...
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
681
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
682 fastcgi_store on;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
683 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
684 fastcgi_temp_path /data/temp;
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 alias /data/www/;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
687 }
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
688 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
689 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
690
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
691 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
692
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
693
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
694 <directive name="fastcgi_store_access">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
695 <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
696 <default>user:rw</default>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
697 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
698 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
699 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
700
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
701 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
702 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
703 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
704 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
705 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
706 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
707
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
708 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
709 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
710 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
711 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
712 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
713 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
714 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
715
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
716 </directive>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
717
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
718
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
719 <directive name="fastcgi_temp_path">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
720 <syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
721 <value>path</value>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
722 [<value>level1</value>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
723 [<value>level2</value>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
724 [<value>level3</value>]]]</syntax>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
725 <default>fastcgi_temp</default>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
726 <context>http</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
727 <context>server</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
728 <context>location</context>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
729
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
730 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
731 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
732 received from another server.
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
733 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
734 directory.
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
735 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
736 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
737 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
738 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
739 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
740 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
741 /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
742 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
743 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
744
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
745 </directive>
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 </section>
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 <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
751
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
752 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
753 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
754 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
755 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
756 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
757 <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
758 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
759 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
760 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
761
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
762 </section>
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
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
765 <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
766
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
767 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
768 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
769 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
770 <link id="fastcgi_param"/> directive:
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
771 <list type="tag">
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
772
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
773 <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
774 <tag-desc>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
775 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
776 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
777 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
778 <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
779 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
780 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
781 following directives
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
782 <example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
783 fastcgi_index index.php;
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
784 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
785 </example>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
786 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
787 “<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
788
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
789 <para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
790 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
791 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
792 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
793 </para>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
794 </tag-desc>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
795
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
796 <tag-name><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
797 <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
798 <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
799 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
800 <literal>PATH_INFO</literal> parameter.
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
801 </tag-desc>
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 </list>
0dcf07c393b6 English translation of the ngx_http_fastcgi_module module documentation.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
804 </para>
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>
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 </module>