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