Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_fastcgi_module.xml @ 461:6135f3c95bf6
Unified markup for lists.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 27 Mar 2012 14:30:18 +0000 |
parents | f8248d0e3c8f |
children | 65843513cff5 |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
135
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
4 |
295 | 5 <module name="Модуль ngx_http_fastcgi_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
6 link="/ru/docs/http/ngx_http_fastcgi_module.html" |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
7 lang="ru"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
106
diff
changeset
|
9 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
10 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 <para> |
295 | 12 Модуль <literal>ngx_http_fastcgi_module</literal> позволяет передавать |
13 запросы FastCGI-серверу. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
15 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
18 |
295 | 19 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
20 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
23 location / { |
295 | 24 fastcgi_pass localhost:9000; |
25 fastcgi_index index.php; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
26 |
295 | 27 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; |
28 fastcgi_param QUERY_STRING $query_string; | |
29 fastcgi_param REQUEST_METHOD $request_method; | |
30 fastcgi_param CONTENT_TYPE $content_type; | |
31 fastcgi_param CONTENT_LENGTH $content_length; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
32 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
36 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
37 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 |
295 | 39 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
40 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
41 <directive name="fastcgi_buffer_size"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
42 <syntax><value>размер</value></syntax> |
295 | 43 <default>4k|8k</default> |
44 <context>http</context> | |
45 <context>server</context> | |
46 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
47 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 <para> |
295 | 49 Задаёт <value>размер</value> буфера, в который будет читаться |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 первая часть ответа, получаемого от FastCGI-сервера. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 В этой части ответа находится, как правило, небольшой заголовок ответа. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
52 По умолчанию размер буфера равен размеру одного буфера в директиве |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 <link id="fastcgi_buffers"/>, однако его можно сделать меньше. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
54 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
55 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
56 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
57 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
58 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
59 <directive name="fastcgi_buffers"> |
271 | 60 <syntax><value>число</value> <value>размер</value></syntax> |
295 | 61 <default>8 4k|8k</default> |
62 <context>http</context> | |
63 <context>server</context> | |
64 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
65 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
66 <para> |
295 | 67 Задаёт <value>число</value> и <value>размер</value> буферов |
68 для одного соединения, | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
69 в которые будет читаться ответ, получаемый от FastCGI-сервера. |
295 | 70 По умолчанию размер одного буфера равен размеру страницы. |
71 В зависимости от платформы это или 4K, или 8K. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
72 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
73 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
74 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
75 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
76 |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
77 <directive name="fastcgi_busy_buffers_size"> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
78 <syntax><value>размер</value></syntax> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
79 <default>8k|16k</default> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
80 <context>http</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
81 <context>server</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
82 <context>location</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
83 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
84 <para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
85 Ограничивает суммарный <value>размер</value> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
86 буферов, которые могут быть заняты для отправки ответа клиенту, пока |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
87 ответ ещё не прочитан целиком. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
88 Оставшиеся буферы тем временем могут использоваться для чтения ответа |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
89 и, при необходимости, буферизации части ответа во временный файл. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
90 По умолчанию <value>размер</value> ограничен двумя буферами, заданными |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
91 директивами <link id="fastcgi_buffer_size"/> и <link id="fastcgi_buffers"/>. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
92 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
93 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
94 </directive> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
95 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
96 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
97 <directive name="fastcgi_cache"> |
271 | 98 <syntax><value>зона</value> | <literal>off</literal></syntax> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
99 <default>off</default> |
295 | 100 <context>http</context> |
101 <context>server</context> | |
102 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
103 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
104 <para> |
295 | 105 Задаёт зону для кэширования. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
106 Одна и та же зона может использоваться в нескольких местах. |
295 | 107 Параметр <literal>off</literal> запрещает кэширование, унаследованное |
108 с предыдущего уровня конфигурации. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
109 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
110 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
111 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
112 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
113 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
114 <directive name="fastcgi_cache_bypass"> |
271 | 115 <syntax><value>строка</value> ...</syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
116 <default/> |
295 | 117 <context>http</context> |
118 <context>server</context> | |
119 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
120 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
121 <para> |
295 | 122 Задаёт условия, при которых ответ не будет браться из кэша. |
123 Если значение хотя бы одного из строковых параметров непустое и не равно “0”, | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
124 то ответ не берётся из кэша: |
98 | 125 <example> |
295 | 126 fastcgi_cache_bypass $cookie_nocache $arg_nocache$arg_comment; |
127 fastcgi_cache_bypass $http_pragma $http_authorization; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
128 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
129 Можно использовать совместно с директивой <link id="fastcgi_no_cache"/>. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
130 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
131 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
132 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
133 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
134 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
135 <directive name="fastcgi_cache_key"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
136 <syntax><value>строка</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
137 <default/> |
295 | 138 <context>http</context> |
139 <context>server</context> | |
140 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
141 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
142 <para> |
295 | 143 Задаёт ключ для кэширования, например, |
98 | 144 <example> |
295 | 145 fastcgi_cache_key localhost:9000$request_uri; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
146 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
147 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
148 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
149 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
150 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
151 |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
152 <directive name="fastcgi_cache_lock"> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
153 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
154 <default>off</default> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
155 <context>http</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
156 <context>server</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
157 <context>location</context> |
310
86732337c730
Added a historical information for proxy_cache_lock, proxy_cache_lock_timeout,
Ruslan Ermilov <ru@nginx.com>
parents:
302
diff
changeset
|
158 <appeared-in>1.1.12</appeared-in> |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
159 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
160 <para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
161 Если включено, одновременно только одному запросу будет позволено |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
162 заполнить новый элемент кэша, идентифицируемый согласно директиве |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
163 <link id="fastcgi_cache_key"/>, передав запрос на FastCGI-сервер. |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
164 Остальные запросы этого же элемента будут либо ожидать |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
165 появления ответа в кэше, либо освобождения блокировки |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
166 этого элемента, в течение времени, заданного директивой |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
167 <link id="fastcgi_cache_lock_timeout"/>. |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
168 </para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
169 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
170 </directive> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
171 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
172 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
173 <directive name="fastcgi_cache_lock_timeout"> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
174 <syntax><value>время</value></syntax> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
175 <default>5s</default> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
176 <context>http</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
177 <context>server</context> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
178 <context>location</context> |
310
86732337c730
Added a historical information for proxy_cache_lock, proxy_cache_lock_timeout,
Ruslan Ermilov <ru@nginx.com>
parents:
302
diff
changeset
|
179 <appeared-in>1.1.12</appeared-in> |
302
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
180 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
181 <para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
182 Задаёт таймаут для <link id="fastcgi_cache_lock"/>. |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
183 </para> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
184 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
185 </directive> |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
186 |
df728215db07
Documented "proxy_cache_lock", "proxy_cache_lock_timeout",
Ruslan Ermilov <ru@nginx.com>
parents:
299
diff
changeset
|
187 |
295 | 188 <directive name="fastcgi_cache_min_uses"> |
189 <syntax><value>число</value></syntax> | |
190 <default>1</default> | |
191 <context>http</context> | |
192 <context>server</context> | |
193 <context>location</context> | |
194 | |
195 <para> | |
196 Задаёт <value>число</value> запросов, после которого ответ будет закэширован. | |
197 </para> | |
198 | |
199 </directive> | |
200 | |
201 | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
202 <directive name="fastcgi_cache_path"> |
271 | 203 <syntax> |
364 | 204 <value>путь</value> |
205 [<literal>levels</literal>=<value>уровни</value>] | |
206 <literal>keys_zone</literal>=<value>имя</value>:<value>размер</value> | |
207 [<literal>inactive</literal>=<value>время</value>] | |
208 [<literal>max_size</literal>=<value>размер</value>]</syntax> | |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
209 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
210 <context>http</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
211 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
212 <para> |
295 | 213 Задаёт путь и другие параметры кэша. |
214 Данные кэша хранятся в файлах. | |
215 Ключом и именем файла в кэше является результат функции MD5 | |
216 от проксированного URL. | |
217 Параметр <literal>levels</literal> задаёт уровни иерархии кэша, | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
218 например, при использовании |
98 | 219 <example> |
295 | 220 fastcgi_cache_path /data/nginx/cache levels=1:2 keys_zone=one:10m; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
221 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
222 имена файлов в кэше будут такого вида: |
98 | 223 <example> |
295 | 224 /data/nginx/cache/<emphasis>c</emphasis>/<emphasis>29</emphasis>/b7f54b2df7773722d382f4809d650<emphasis>29c</emphasis> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
225 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
226 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
227 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
228 <para> |
295 | 229 Кэшируемый ответ сначала записывается во временный файл, а потом этот файл |
364 | 230 переименовывается. |
231 Начиная с версии 0.8.9, временные файлы и кэш | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
232 могут располагаться на разных файловых системах, но нужно учитывать, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
233 что в этом случае вместо дешёвой операции переименовывания в пределах |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
234 одной файловой системы файл копируется с одной файловой системы на другую. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
235 Поэтому лучше, если кэш будет находиться на той же файловой |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
236 системе, что и каталог с временными файлами, задаваемый директивой |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
237 <link id="fastcgi_temp_path"/> для данного location. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
238 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
239 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
240 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
241 Кроме того, все активные ключи и информация о данных хранятся в разделяемой |
295 | 242 памяти — зоне, <value>имя</value> и <value>размер</value> которой |
243 задаются параметром <literal>keys_zone</literal>. | |
285 | 244 Если к данным кэша не обращаются в течение времени, заданного параметром |
295 | 245 <literal>inactive</literal>, то данные удаляются, независимо от их свежести. |
246 По умолчанию <literal>inactive</literal> равен 10 минутам. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
247 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
248 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
249 <para> |
295 | 250 Специальный процесс “cache manager” следит за максимальным размером кэша, |
251 заданным параметром <literal>max_size</literal>, и при превышении | |
252 его размеров удаляет самые невостребованные данные. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
253 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
254 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
255 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
256 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
257 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
258 <directive name="fastcgi_cache_use_stale"> |
271 | 259 <syntax> |
364 | 260 <literal>error</literal> | |
261 <literal>timeout</literal> | | |
262 <literal>invalid_header</literal> | | |
263 <literal>updating</literal> | | |
264 <literal>http_500</literal> | | |
265 <literal>http_503</literal> | | |
266 <literal>http_404</literal> | | |
267 <literal>off</literal> | |
268 ...</syntax> | |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
269 <default>off</default> |
295 | 270 <context>http</context> |
271 <context>server</context> | |
272 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
273 |
295 | 274 <para> |
275 Определяет, в каких случаях можно использовать устаревший закэшированный ответ, | |
276 если при работе с FastCGI-сервером возникла ошибка. | |
277 Параметры директивы совпадают с параметрами | |
278 директивы <link id="fastcgi_next_upstream"/>. | |
279 Кроме того, дополнительный параметр <literal>updating</literal> | |
280 разрешает использовать устаревший закэшированный ответ, | |
281 если на данный момент он уже обновляется. | |
282 </para> | |
283 | |
284 </directive> | |
285 | |
286 | |
287 <directive name="fastcgi_cache_valid"> | |
288 <syntax>[<value>код</value> ...] <value>время</value></syntax> | |
289 <default/> | |
290 <context>http</context> | |
291 <context>server</context> | |
292 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
293 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
294 <para> |
295 | 295 Задаёт время кэширования для разных кодов ответа. |
296 Например, директивы | |
297 <example> | |
298 fastcgi_cache_valid 200 302 10m; | |
299 fastcgi_cache_valid 404 1m; | |
300 </example> | |
301 задают время кэширования 10 минут для ответов с кодами 200 и 302, | |
302 и 1 минуту для ответов с кодом 404. | |
303 </para> | |
304 | |
305 <para> | |
306 Если указано только <value>время</value> кэширования, | |
307 <example> | |
308 fastcgi_cache_valid 5m; | |
309 </example> | |
310 то кэшируются только ответы 200, 301 и 302. | |
311 </para> | |
312 | |
313 <para> | |
314 Кроме того, можно кэшировать любые ответы с помощью параметра | |
315 <literal>any</literal>: | |
316 <example> | |
317 fastcgi_cache_valid 200 302 10m; | |
318 fastcgi_cache_valid 301 1h; | |
319 fastcgi_cache_valid any 1m; | |
320 </example> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
321 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
322 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
323 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
324 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
325 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
326 <directive name="fastcgi_connect_timeout"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
327 <syntax><value>время</value></syntax> |
295 | 328 <default>60s</default> |
329 <context>http</context> | |
330 <context>server</context> | |
331 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
332 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
333 <para> |
295 | 334 Задаёт таймаут для установления соединения с FastCGI-сервером. |
335 Необходимо иметь в виду, что этот таймаут обычно не может превышать 75 секунд. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
336 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
337 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
338 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
339 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
340 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
341 <directive name="fastcgi_hide_header"> |
295 | 342 <syntax><value>поле</value></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
343 <default/> |
295 | 344 <context>http</context> |
345 <context>server</context> | |
346 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
347 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
348 <para> |
295 | 349 По умолчанию |
350 nginx не передаёт клиенту поля заголовка <header>Status</header> и | |
351 <header>X-Accel-...</header> из ответа FastCGI-сервера. | |
352 Директива <literal>fastcgi_hide_header</literal> задаёт дополнительные поля, | |
353 которые не будут передаваться. | |
354 Если же передачу полей нужно разрешить, можно воспользоваться | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
355 директивой <link id="fastcgi_pass_header"/>. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
356 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
357 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
358 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
359 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
360 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
361 <directive name="fastcgi_ignore_client_abort"> |
271 | 362 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
363 <default>off</default> |
295 | 364 <context>http</context> |
365 <context>server</context> | |
366 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
367 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
368 <para> |
295 | 369 Определяет, закрывать ли соединение с FastCGI-сервером |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
370 в случае, если клиент закрыл соединение, не дождавшись ответа. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
371 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
372 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
373 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
374 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
375 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
376 <directive name="fastcgi_ignore_headers"> |
295 | 377 <syntax><value>поле</value> ...</syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
378 <default/> |
295 | 379 <context>http</context> |
380 <context>server</context> | |
381 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
382 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
383 <para> |
295 | 384 Запрещает обработку некоторых полей заголовка из ответа FastCGI-сервера. |
385 В директиве можно указать поля <header>X-Accel-Redirect</header>, | |
386 <header>X-Accel-Expires</header>, <header>X-Accel-Limit-Rate</header> (1.1.6), | |
387 <header>X-Accel-Buffering</header> (1.1.6), | |
388 <header>X-Accel-Charset</header> (1.1.6), <header>Expires</header>, | |
389 <header>Cache-Control</header> и <header>Set-Cookie</header> (0.8.44). | |
390 </para> | |
391 | |
392 </directive> | |
393 | |
394 | |
395 <directive name="fastcgi_index"> | |
396 <syntax><value>имя</value></syntax> | |
397 <default/> | |
398 <context>http</context> | |
399 <context>server</context> | |
400 <context>location</context> | |
401 | |
402 <para> | |
403 Задаёт имя файла, который при создании переменной | |
404 <var>$fastcgi_script_name</var> будет добавляться после URI, | |
405 если URI заканчивается слэшом. | |
406 Например, при таких настройках | |
407 <example> | |
408 fastcgi_index index.php; | |
409 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; | |
410 </example> | |
411 и запросе “<literal>/page.php</literal>” | |
412 параметр <literal>SCRIPT_FILENAME</literal> будет равен | |
413 “<literal>/home/www/scripts/php/page.php</literal>”, | |
414 а при запросе “<literal>/</literal>”— | |
415 “<literal>/home/www/scripts/php/index.php</literal>”. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
416 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
417 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
418 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
419 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
420 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
421 <directive name="fastcgi_intercept_errors"> |
271 | 422 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
423 <default>off</default> |
295 | 424 <context>http</context> |
425 <context>server</context> | |
426 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
427 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
428 <para> |
295 | 429 Определяет, передавать ли клиенту ответы FastCGI-сервера с кодом |
430 больше либо равным 400, или же перенаправлять их на обработку nginx'у с помощью | |
431 директивы <link doc="ngx_http_core_module.xml" id="error_page"/>. | |
98 | 432 </para> |
433 | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
434 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
435 |
364 | 436 |
316
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
437 <directive name="fastcgi_keep_conn"> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
438 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
439 <default>off</default> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
440 <context>http</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
441 <context>server</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
442 <context>location</context> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
443 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
444 <para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
445 По умолчанию FastCGI-сервер будет закрывать соединение сразу же |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
446 после отправки ответа. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
447 При установке значения <literal>on</literal> nginx указывает |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
448 FastCGI-серверу оставлять соединения открытыми. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
449 Это в частности требуется для функционирования |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
450 <link doc="ngx_http_upstream_module.xml" id="keepalive">постоянных |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
451 соединений</link> с FastCGI-серверами. |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
452 </para> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
453 |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
454 </directive> |
1fb1c077658b
Documented the following directives: "keepalive", "proxy_http_version",
Ruslan Ermilov <ru@nginx.com>
parents:
310
diff
changeset
|
455 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
456 |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
457 <directive name="fastcgi_max_temp_file_size"> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
458 <syntax><value>размер</value></syntax> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
459 <default>1024m</default> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
460 <context>http</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
461 <context>server</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
462 <context>location</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
463 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
464 <para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
465 Если ответ не вмещается целиком в буферы памяти, заданные |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
466 директивами <link id="fastcgi_buffer_size"/> и <link id="fastcgi_buffers"/>, |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
467 часть ответа может быть записана во временный файл. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
468 Эта директива задаёт максимальный <value>размер</value> временного файла. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
469 Размер данных, сбрасываемых во временный файл за один раз, задаётся |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
470 директивой <link id="fastcgi_temp_file_write_size"/>. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
471 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
472 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
473 <para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
474 Значение 0 отключает возможность буферизации ответов во временные файлы. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
475 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
476 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
477 </directive> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
478 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
479 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
480 <directive name="fastcgi_next_upstream"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
481 <syntax> |
364 | 482 <literal>error</literal> | |
483 <literal>timeout</literal> | | |
484 <literal>invalid_header</literal> | | |
485 <literal>http_500</literal> | | |
486 <literal>http_503</literal> | | |
487 <literal>http_404</literal> | | |
488 <literal>off</literal> | |
489 ...</syntax> | |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
490 <default>error timeout</default> |
295 | 491 <context>http</context> |
492 <context>server</context> | |
493 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
494 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
495 <para> |
295 | 496 Определяет, в каких случаях запрос будет передан следующему серверу: |
497 <list type="tag"> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
498 |
295 | 499 <tag-name><literal>error</literal></tag-name> |
500 <tag-desc>произошла ошибка соединения с сервером, передачи ему запроса или | |
501 чтения заголовка ответа сервера;</tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
502 |
295 | 503 <tag-name><literal>timeout</literal></tag-name> |
504 <tag-desc>произошёл таймаут во время соединения с сервером, | |
505 передачи ему запроса или чтения заголовка ответа сервера;</tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
506 |
295 | 507 <tag-name><literal>invalid_header</literal></tag-name> |
508 <tag-desc>сервер вернул пустой или неверный ответ;</tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
509 |
295 | 510 <tag-name><literal>http_500</literal></tag-name> |
511 <tag-desc>сервер вернул ответ с кодом 500;</tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
512 |
295 | 513 <tag-name><literal>http_503</literal></tag-name> |
514 <tag-desc>сервер вернул ответ с кодом 503;</tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
515 |
295 | 516 <tag-name><literal>http_404</literal></tag-name> |
517 <tag-desc>сервер вернул ответ с кодом 404;</tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
518 |
295 | 519 <tag-name><literal>off</literal></tag-name> |
520 <tag-desc>запрещает передачу запроса следующему серверу.</tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
521 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
522 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
523 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
524 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
525 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
526 Необходимо понимать, что передача запроса следующему серверу возможна |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
527 только при условии, что клиенту ещё ничего не передавалось. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
528 То есть, если ошибка или таймаут возникли в середине передачи ответа, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
529 то исправить это уже невозможно. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
530 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
531 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
532 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
533 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
534 |
295 | 535 <directive name="fastcgi_no_cache"> |
536 <syntax><value>строка</value> ...</syntax> | |
537 <default/> | |
538 <context>http</context> | |
539 <context>server</context> | |
540 <context>location</context> | |
541 | |
542 <para> | |
543 Задаёт условия, при которых ответ не будет сохраняться в кэш. | |
544 Если значение хотя бы одного из строковых параметров непустое и не равно “0”, | |
545 то ответ не будет сохранён: | |
546 <example> | |
547 fastcgi_no_cache $cookie_nocache $arg_nocache$arg_comment; | |
548 fastcgi_no_cache $http_pragma $http_authorization; | |
549 </example> | |
550 Можно использовать совместно с директивой <link id="fastcgi_cache_bypass"/>. | |
551 </para> | |
552 | |
553 </directive> | |
554 | |
555 | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
556 <directive name="fastcgi_param"> |
239
fe72da550150
"fastcgi_param" directive has new parameter "if_not_empty".
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
557 <syntax> |
271 | 558 <value>параметр</value> <value>значение</value> |
559 [<literal>if_not_empty</literal>]</syntax> | |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
560 <default/> |
295 | 561 <context>http</context> |
562 <context>server</context> | |
563 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
564 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
565 <para> |
295 | 566 Задаёт <value>параметр</value>, который будет передаваться FastCGI-серверу. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
567 В качестве значения можно использовать текст, переменные и их комбинации. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
568 Директивы наследуются с предыдущего уровня при условии, что на данном |
271 | 569 уровне не описаны свои директивы <literal>fastcgi_param</literal>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
570 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
571 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
572 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
573 Ниже приведён пример минимально необходимых параметров для PHP: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
574 <example> |
295 | 575 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; |
576 fastcgi_param QUERY_STRING $query_string; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
577 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
578 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
579 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
580 <para> |
295 | 581 Параметр <literal>SCRIPT_FILENAME</literal> используется в PHP для |
582 определения имени скрипта, а в параметре <literal>QUERY_STRING</literal> | |
583 передаются параметры запроса. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
584 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
585 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
586 <para> |
295 | 587 Если скрипты обрабатывают запросы <literal>POST</literal>, то нужны |
588 ещё три параметра: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
589 <example> |
295 | 590 fastcgi_param REQUEST_METHOD $request_method; |
591 fastcgi_param CONTENT_TYPE $content_type; | |
592 fastcgi_param CONTENT_LENGTH $content_length; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
593 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
594 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
595 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
596 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
597 Если PHP был собран с параметром конфигурации |
271 | 598 <literal>--enable-force-cgi-redirect</literal>, то нужно передавать |
295 | 599 параметр <literal>REDIRECT_STATUS</literal> со значением “200”: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
600 <example> |
295 | 601 fastcgi_param REDIRECT_STATUS 200; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
602 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
603 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
604 |
239
fe72da550150
"fastcgi_param" directive has new parameter "if_not_empty".
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
605 <para> |
295 | 606 Если директива указана с <literal>if_not_empty</literal> (1.1.11), |
239
fe72da550150
"fastcgi_param" directive has new parameter "if_not_empty".
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
607 то такой параметр с пустым значением передаваться на сервер не будет: |
fe72da550150
"fastcgi_param" directive has new parameter "if_not_empty".
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
608 <example> |
295 | 609 fastcgi_param HTTPS $https if_not_empty; |
239
fe72da550150
"fastcgi_param" directive has new parameter "if_not_empty".
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
610 </example> |
fe72da550150
"fastcgi_param" directive has new parameter "if_not_empty".
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
611 </para> |
fe72da550150
"fastcgi_param" directive has new parameter "if_not_empty".
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
612 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
613 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
614 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
615 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
616 <directive name="fastcgi_pass"> |
295 | 617 <syntax><value>адрес</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
618 <default/> |
295 | 619 <context>location</context> |
620 <context>if в location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
621 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
622 <para> |
295 | 623 Задаёт адрес FastCGI-сервера. |
624 Адрес может быть указан в виде доменного имени или адреса, и порта, например, | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
625 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
316
diff
changeset
|
626 fastcgi_pass localhost:9000; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
627 </example> |
295 | 628 или в виде пути UNIX-сокета: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
629 <example> |
351
a4fa80755eab
Consistently strip initial offset in examples.
Ruslan Ermilov <ru@nginx.com>
parents:
316
diff
changeset
|
630 fastcgi_pass unix:/tmp/fastcgi.socket; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
631 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
632 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
633 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
634 <para> |
295 | 635 Если доменному имени соответствует несколько адресов, то все они будут |
636 использоваться по очереди (round-robin). | |
637 И, кроме того, адрес может быть | |
135
edf8c90f8085
Renamed ngx_http_upstream to ngx_http_upstream_module.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
638 <link doc="ngx_http_upstream_module.xml">группой серверов</link>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
639 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
640 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
641 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
642 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
643 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
644 <directive name="fastcgi_pass_header"> |
295 | 645 <syntax><value>поле</value></syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
646 <default/> |
295 | 647 <context>http</context> |
648 <context>server</context> | |
649 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
650 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
651 <para> |
295 | 652 Разрешает передавать от FastCGI-сервера клиенту |
653 <link id="fastcgi_hide_header">запрещённые для передачи</link> поля заголовка. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
654 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
655 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
656 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
657 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
658 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
659 <directive name="fastcgi_read_timeout"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
660 <syntax><value>время</value></syntax> |
295 | 661 <default>60s</default> |
662 <context>http</context> | |
663 <context>server</context> | |
664 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
665 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
666 <para> |
295 | 667 Задаёт таймаут при чтении ответа FastCGI-сервера. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
668 Таймаут устанавливается не на всю передачу ответа, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
669 а только между двумя операциями чтения. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
670 Если по истечении этого времени FastCGI-сервер ничего не передаст, |
295 | 671 соединение закрывается. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
672 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
673 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
674 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
675 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
676 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
677 <directive name="fastcgi_send_timeout"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
678 <syntax><value>время</value></syntax> |
295 | 679 <default>60s</default> |
680 <context>http</context> | |
681 <context>server</context> | |
682 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
683 |
98 | 684 <para> |
295 | 685 Задаёт таймаут при передаче запроса FastCGI-серверу. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
686 Таймаут устанавливается не на всю передачу запроса, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
687 а только между двумя операциями записи. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
688 Если по истечении этого времени FastCGI-сервер не примет новых данных, |
295 | 689 соединение закрывается. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
690 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
691 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
692 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
693 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
694 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
695 <directive name="fastcgi_split_path_info"> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
696 <syntax><value>regex</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
98
diff
changeset
|
697 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
698 <context>location</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
699 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
700 <para> |
295 | 701 Задаёт регулярное выражение, выделяющее значение для переменной |
702 <var>$fastcgi_path_info</var>. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
703 Регулярное выражение должно иметь два выделения, из которых первое |
295 | 704 становится значением переменной <var>$fastcgi_script_name</var>, |
705 а второе—значением переменной <var>$fastcgi_path_info</var>. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
706 Например, при таких настройках |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
707 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
708 location ~ ^(.+\.php)(.*)$ { |
295 | 709 fastcgi_split_path_info ^(.+\.php)(.*)$; |
710 fastcgi_param SCRIPT_FILENAME /path/to/php$fastcgi_script_name; | |
711 fastcgi_param PATH_INFO $fastcgi_path_info; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
712 </example> |
295 | 713 и запросе “<literal>/show.php/article/0001</literal>” |
714 параметр <literal>SCRIPT_FILENAME</literal> будет равен | |
715 “<literal>/path/to/php/show.php</literal>”, а параметр | |
716 <literal>PATH_INFO</literal>—“<literal>/article/0001</literal>”. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
717 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
718 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
719 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
720 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
721 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
722 <directive name="fastcgi_store"> |
271 | 723 <syntax> |
295 | 724 <literal>on</literal> | |
725 <literal>off</literal> | | |
726 <value>строка</value></syntax> | |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
727 <default>off</default> |
295 | 728 <context>http</context> |
729 <context>server</context> | |
730 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
731 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
732 <para> |
295 | 733 Разрешает сохранение на диск файлов. |
734 Параметр <literal>on</literal> сохраняет файлы в соответствии с путями, | |
735 указанными в директивах | |
106
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
736 <link doc="ngx_http_core_module.xml" id="alias"/> или |
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
737 <link doc="ngx_http_core_module.xml" id="root"/>. |
295 | 738 Параметр <literal>off</literal> запрещает сохранение файлов. |
739 Кроме того, имя файла можно задать явно с помощью строки с переменными: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
740 <example> |
295 | 741 fastcgi_store /data/www$original_uri; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
742 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
743 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
744 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
745 <para> |
295 | 746 Время изменения файлов выставляется согласно полученному полю |
747 <header>Last-Modified</header> в заголовке ответа. | |
748 Ответ сначала записывается во временный файл, а потом этот файл | |
749 переименовывается. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
750 Начиная с версии 0.8.9, временный файл и постоянное место хранения ответа |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
751 могут располагаться на разных файловых системах, но нужно учитывать, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
752 что в этом случае вместо дешёвой операции переименовывания в пределах |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
753 одной файловой системы файл копируется с одной файловой системы на другую. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
754 Поэтому лучше, если сохраняемые файлы будут находиться на той же файловой |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
755 системе, что и каталог с временными файлами, задаваемый директивой |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
756 <link id="fastcgi_temp_path"/> для данного location. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
757 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
758 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
759 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
760 Директиву можно использовать для создания локальных копий статических |
295 | 761 неизменяемых файлов, например, так: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
762 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
763 location /images/ { |
295 | 764 root /data/www; |
765 open_file_cache_errors off; | |
766 error_page 404 = /fetch$uri; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
767 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
768 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
769 location /fetch/ { |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
770 internal; |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
771 |
295 | 772 fastcgi_pass backend:9000; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
773 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
774 |
295 | 775 fastcgi_store on; |
776 fastcgi_store_access user:rw group:rw all:r; | |
777 fastcgi_temp_path /data/temp; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
778 |
295 | 779 alias /data/www/; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
780 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
781 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
782 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
783 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
784 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
785 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
786 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
787 <directive name="fastcgi_store_access"> |
271 | 788 <syntax><value>пользователи</value>:<value>права</value> ...</syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
789 <default>user:rw</default> |
295 | 790 <context>http</context> |
791 <context>server</context> | |
792 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
793 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
794 <para> |
295 | 795 Задаёт права доступа для создаваемых файлов и каталогов, например, |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
796 <example> |
295 | 797 fastcgi_store_access user:rw group:rw all:r; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
798 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
799 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
800 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
801 <para> |
295 | 802 Если заданы какие-либо права для <literal>group</literal> или |
803 <literal>all</literal>, то права для <literal>user</literal> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
804 указывать необязательно: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
805 <example> |
295 | 806 fastcgi_store_access group:rw all:r; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
807 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
808 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
809 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
810 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
811 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
812 |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
813 <directive name="fastcgi_temp_file_write_size"> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
814 <syntax><value>размер</value></syntax> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
815 <default>8k|16k</default> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
816 <context>http</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
817 <context>server</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
818 <context>location</context> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
819 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
820 <para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
821 Ограничивает <value>размер</value> данных, сбрасываемых во временный файл |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
822 за один раз, при включённой буферизации ответов FastCGI-сервера |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
823 во временные файлы. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
824 По умолчанию <value>размер</value> ограничен двумя буферами, заданными |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
825 директивами <link id="fastcgi_buffer_size"/> и <link id="fastcgi_buffers"/>. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
826 Максимальный размер временного файла задаётся директивой |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
827 <link id="fastcgi_max_temp_file_size"/>. |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
828 </para> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
829 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
830 </directive> |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
831 |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
832 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
833 <directive name="fastcgi_temp_path"> |
295 | 834 <syntax> |
835 <value>путь</value> | |
836 [<value>уровень1</value> | |
837 [<value>уровень2</value> | |
838 [<value>уровень3</value>]]]</syntax> | |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
839 <default>fastcgi_temp</default> |
295 | 840 <context>http</context> |
841 <context>server</context> | |
842 <context>location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
843 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
844 <para> |
411
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
845 Задаёт имя каталога для хранения временных файлов с данными, |
f8248d0e3c8f
Documented the following directives: fastcgi_busy_buffers_size,
Ruslan Ermilov <ru@nginx.com>
parents:
367
diff
changeset
|
846 полученными от FastCGI-серверов. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
847 В каталоге может использоваться иерархия подкаталогов до трёх уровней. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
848 Например, при такой конфигурации |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
849 <example> |
295 | 850 fastcgi_temp_path /spool/nginx/fastcgi_temp 1 2; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
851 </example> |
295 | 852 временный файл будет следующего вида: |
98 | 853 <example> |
295 | 854 /spool/nginx/fastcgi_temp/<emphasis>7</emphasis>/<emphasis>45</emphasis>/00000123<emphasis>457</emphasis> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
855 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
856 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
857 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
858 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
859 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
860 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
861 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
862 |
295 | 863 <section id="parameters" name="Параметры, передаваемые FastCGI-серверу"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
864 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
865 <para> |
295 | 866 Поля заголовка HTTP-запроса передаются FastCGI-серверу в виде параметров. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
867 В приложениях и скриптах, запущенных в виде FastCGI-сервера, |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
868 эти параметры обычно доступны в виде переменных среды. |
295 | 869 Например, поле заголовка <header>User-Agent</header> передаётся как параметр |
870 <literal>HTTP_USER_AGENT</literal>. | |
871 Кроме полей заголовка HTTP-запроса можно передавать произвольные параметры | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
872 с помощью директивы <link id="fastcgi_param"/>. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
873 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
874 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
875 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
876 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
877 |
295 | 878 <section id="variables" name="Встроенные переменные"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
879 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
880 <para> |
295 | 881 В модуле <literal>ngx_http_fastcgi_module</literal> есть встроенные переменные, |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
882 которые можно использовать для формирования параметров с помощью директивы |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
883 <link id="fastcgi_param"/>: |
295 | 884 <list type="tag"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
885 |
295 | 886 <tag-name><var>$fastcgi_script_name</var></tag-name> |
887 <tag-desc> | |
888 URI запроса или же, если URI заканчивается слэшом, | |
367
f4033b9bc4ec
- Removed unnecessary instances of unbreakable space.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
889 то URI запроса, дополненное именем индексного файла, задаваемого директивой |
295 | 890 <link id="fastcgi_index"/>. |
891 Эту переменную можно использовать для задания параметров | |
892 <literal>SCRIPT_FILENAME</literal> и <literal>PATH_TRANSLATED</literal>, | |
893 используемых, в частности, для определения имени скрипта в PHP. | |
894 Например, для запроса “<literal>/info/</literal>” и при использовании | |
895 директив | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
896 <example> |
295 | 897 fastcgi_index index.php; |
898 fastcgi_param SCRIPT_FILENAME /home/www/scripts/php$fastcgi_script_name; | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
899 </example> |
295 | 900 параметр <literal>SCRIPT_FILENAME</literal> будет равен |
901 “<literal>/home/www/scripts/php/info/index.php</literal>”. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
902 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
903 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
904 При использовании директивы <link id="fastcgi_split_path_info"/> |
295 | 905 переменная <var>$fastcgi_script_name</var> равна значению первого выделения, |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
906 задаваемого этой директивой. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
907 </para> |
295 | 908 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
909 |
295 | 910 <tag-name><var>$fastcgi_path_info</var></tag-name> |
911 <tag-desc>значение второго выделения, задаваемого директивой | |
912 <link id="fastcgi_split_path_info"/>. | |
913 Эту переменную можно использовать для задания параметра | |
914 <literal>PATH_INFO</literal>. | |
915 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
916 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
917 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
918 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
919 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
920 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
921 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
922 </module> |