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