annotate xml/ru/docs/http/ngx_http_core_module.xml @ 253:ff1e139a8c98

Bring the ngx_http_core_module documentation up to date.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 19 Dec 2011 13:10:05 +0000
parents bfe3eff81d04
children 945d7299c26c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
222
bfe3eff81d04 Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents: 108
diff changeset
1 <?xml version="1.0"?>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
4
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
5 <module name="Модуль ngx_http_core_module"
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
6 link="/ru/docs/http/ngx_http_core_module.html"
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
7 lang="ru">
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
8
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
9 <section id="directives" name="Директивы">
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
10
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
11 <directive name="aio">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
12 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
13 <value>on</value> |
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
14 <value>off</value> |
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
15 <value>sendfile</value>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
16 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
17 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
18 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
19 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
20 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
21 <appeared-in>0.8.11</appeared-in>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
22
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
23 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
24 Разрешает или запрещает использование файлового асинхронного ввода-вывода (AIO)
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
25 во FreeBSD и Linux.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
26 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
27
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
28 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
29 Во FreeBSD AIO можно использовать, начиная с FreeBSD&nbsp;4.3.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
30 AIO можно либо собрать в ядре статически:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
31 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
32 options VFS_AIO
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
33 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
34 либо загрузить динамически через загружаемый модуль ядра:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
35 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
36 kldload aio
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
37 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
38 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
39
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
40 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
41 В версиях FreeBSD 5 и 6 включение AIO статически или динамически
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
42 на стадии загрузки ядра приводит к тому, что вся сетевая подсистема
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
43 будет использовать блокировку Giant, что может негативно сказаться на
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
44 производительности системы в целом.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
45 Это ограничение устранено во FreeBSD&nbsp;6.4-STABLE в 2009 году
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
46 и во FreeBSD&nbsp;7.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
47 Однако, начиная с FreeBSD&nbsp;5.3 есть возможность включать AIO,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
48 не связывая сетевую подсистему блокировкой Giant — для этого модуль
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
49 AIO нужно подгружать уже после загрузки ядра.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
50 В этом случае в <path>/var/log/messages</path> появится следующее сообщение:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
51 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
52 WARNING: Network stack Giant-free, but aio requires Giant.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
53 Consider adding 'options NET_WITH_GIANT' or setting debug.mpsafenet=0
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
54 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
55 которое можно смело проигнорировать.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
56 <note>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
57 Требование использовать блокировку Giant в AIO связано с тем, что
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
58 FreeBSD поддерживает асинхронные вызовы
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
59 <c-func>aio_read</c-func>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
60 и
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
61 <c-func>aio_write</c-func>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
62 для работы с сокетами.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
63 Но поскольку nginx использует AIO только для работы с диском,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
64 то проблем не возникает.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
65 </note>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
66 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
67
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
68 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
69 Для работы AIO нужно выключить
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
70 <link id="sendfile"/>:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
71 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
72 location /video/ {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
73 sendfile off;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
74 aio on;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
75 output_buffers 1 64k;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
76 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
77 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
78 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
79
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
80 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
81 Кроме того, начиная с FreeBSD&nbsp;5.2.1 и nginx&nbsp;0.8.12, AIO также можно
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
82 использовать для подгрузки данных для <c-func>sendfile</c-func>:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
83 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
84 location /video/ {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
85 sendfile on;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
86 tcp_nopush on;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
87 aio sendfile;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
88 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
89 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
90 В такой конфигурации функция <c-func>sendfile</c-func> вызывается с флагом
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
91 <c-def>SF_NODISKIO</c-def>, в результате она не блокируется на диске, а
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
92 сообщает об отсутствии данных в памяти, после чего nginx инициирует
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
93 асинхронную подгрузку данных, читая только один байт.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
94 При этом ядро FreeBSD подгружает в память первые 128K байт файла, однако
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
95 при последующих чтениях файл подгружается частями только по 16K.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
96 Изменить это можно с помощью директивы
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
97 <link id="read_ahead"/>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
98 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
99
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
100 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
101 В Linux AIO можно использовать только начиная с версии ядра 2.6.22, и,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
102 кроме того, ещё необходимо дополнительно включать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
103 <link id="directio"/>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
104 иначе чтение будет блокирующимся:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
105 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
106 location /video/ {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
107 aio on;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
108 directio 512;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
109 output_buffers 1 128k;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
110 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
111 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
112 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
113
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
114 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
115 Поскольку
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
116 <link id="directio"/>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
117 в Linux можно использовать только для чтения блоков, выравненных
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
118 на границу 512 байт (или 4К для XFS), то невыравненный конец файла
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
119 будет читаться блокированно.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
120 То же относится к запросам с указанием диапазона запрашиваемых байт
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
121 (byte-range requests) и к запросам FLV не с начала файла: чтение
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
122 невыравненных начала и конца ответа будет блокирующимся.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
123 Явно выключать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
124 <link id="sendfile"/>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
125 не нужно, так как при использовании
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
126 <link id="directio"/>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
127 он выключается автоматически.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
128 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
129
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
130 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
131
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
132
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
133 <directive name="alias">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
134 <syntax><argument>путь</argument></syntax>
99
1d315ef37215 The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents: 79
diff changeset
135 <default/>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
136 <context>location</context>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
137
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
138 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
139 Задаёт замену для указанного location'а.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
140 Например, при такой конфигурации
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
141 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
142 location /i/ {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
143 alias /data/w3/images/;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
144 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
145 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
146 на запрос
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
147 “<code>/i/top.gif</code>” будет отдан файл
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
148 <path>/data/w3/images/top.gif</path>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
149 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
150
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
151 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
152 В значении аргумента <argument>путь</argument> можно использовать переменные,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
153 кроме <var>$document_root</var> и <var>$realpath_root</var>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
154 </para>
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 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
157 Если <code>alias</code> используется внутри location'а, заданного
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
158 регулярным выражением, то регулярное выражение должно содержать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
159 выделения, а сам <code>alias</code> — ссылки на эти выделения
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
160 (0.7.40), например:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
161 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
162 location ~ ^/users/(.+\.(?:gif|jpe?g|png))$ {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
163 alias /data/w3/images/$1;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
164 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
165 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
166 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
167
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
168 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
169 Если location и последняя часть значения директивы совпадают:
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
170 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
171 location /images/ {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
172 alias /data/w3/images/;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
173 }
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
174 </example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
175 то лучше воспользоваться директивой
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
176 <link id="root"/>:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
177 <example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
178 location /images/ {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
179 root /data/w3;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
180 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
181 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
182 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
183
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
184 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
185
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
186
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
187 <directive name="chunked_transfer_encoding">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
188 <syntax><value>on</value> | <value>off</value></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
189 <default>on</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
190 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
191 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
192 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
193
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
194 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
195 Позволяет запретить формат передачи данных частями (chunked transfer
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
196 encoding) в HTTP/1.1.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
197 Это может понадобиться при использовании программ, не поддерживающих
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
198 chunked encoding, несмотря на требования стандарта.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
199 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
200
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
201 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
202
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
203
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
204 <directive name="client_body_buffer_size">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
205
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
206 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
207 <default>8k|16k</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
208 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
209 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
210 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
211
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
212 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
213 Задаёт размер буфера для чтения тела запроса клиента.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
214 Если тело запроса больше заданного буфера,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
215 то всё тело запроса или только его часть записывается во
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
216 <link id="client_body_temp_path">временный файл</link>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
217 По умолчанию размер одного буфера равен двум размерам страницы.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
218 На x86, других 32-битных платформах и x86-64 это 8K.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
219 На других 64-битных платформах это обычно 16K.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
220 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
221
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
222 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
223
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
224
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
225 <directive name="client_body_in_file_only">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
226 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
227 <value>on</value> |
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
228 <value>clean</value> |
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
229 <value>off</value>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
230 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
231 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
232 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
233 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
234 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
235
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
236 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
237 Определяет, сохранять ли всё тело запроса клиента в файл.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
238 Директиву можно использовать для отладки и при использовании переменной
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
239 <var>$request_body_file</var>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
240 или метода
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
241 <link doc="ngx_http_perl_module.xml" id="methods">$r->request_body_file</link>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
242 модуля
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
243 <link doc="ngx_http_perl_module.xml">ngx_http_perl_module</link>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
244 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
245
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
246 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
247 При установке значения <value>on</value> временные файлы
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
248 по окончании обработки запроса не удаляются.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
249 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
250
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
251 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
252 Значение <value>clean</value> разрешает удалять временные файлы,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
253 оставшиеся по окончании обработки запроса.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
254 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
255
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
256 </directive>
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 <directive name="client_body_in_single_buffer">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
260 <syntax><value>on</value> | <value>off</value>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
261 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
262 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
263 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
264 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
265 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
266
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
267 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
268 Определяет, сохранять ли всё тело запроса клиента в одном буфере.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
269 Директива рекомендуется при использовании переменной
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
270 <var>$request_body</var>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
271 для уменьшения требуемого числа операций копирования.
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 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
275
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
276
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
277 <directive name="client_body_temp_path">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
278 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
279 <argument>путь</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
280 [<argument>уровень1</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
281 [<argument>уровень2</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
282 [<argument>уровень3</argument>]]]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
283 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
284 <default>client_body_temp</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
285 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
286 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
287 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
288
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
289 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
290 Задаёт каталог для хранения временных файлов с телами запросов клиентов.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
291 В каталоге может использоваться иерархия подкаталогов до трёх уровней.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
292 Например, при такой конфигурации
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
293 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
294 client_body_temp_path /spool/nginx/client_temp 1 2;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
295 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
296 временный файл будет следующего вида:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
297 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
298 /spool/nginx/client_temp/7/45/00000123457
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
299 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
300 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
301
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
302 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
303
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
304
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
305 <directive name="client_body_timeout">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
306 <syntax><argument>время</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
307 <default>60s</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
308 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
309 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
310 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
311
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
312 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
313 Задаёт таймаут при чтении тела запроса клиента.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
314 Таймаут устанавливается не на всю передачу тела запроса,
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
315 а только между двумя последовательными операциями чтения.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
316 Если по истечении этого времени клиент ничего не передаст,
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
317 то клиенту возвращается ошибка
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
318 <http-status code="408" text="Request Time-out"/>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
319 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
320
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
321 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
322
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
323
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
324 <directive name="client_header_buffer_size">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
325 <syntax><argument>размер</argument></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
326 <default>1k</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
327 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
328 <context>server</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
329
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
330 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
331 Задаёт размер буфера для чтения заголовка запроса клиента.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
332 Для большинства запросов достаточно буфера размером в 1K байт.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
333 Однако если в запросе есть длинные cookies, или же запрос
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
334 пришёл от WAP-клиента, то он может не поместиться в 1K.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
335 Поэтому, если строка запроса или поле заголовка запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
336 не помещаются полностью в этот буфер, то выделяются буферы
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
337 большего размера, задаваемые директивой
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
338 <link id="large_client_header_buffers"/>.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
339 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
340
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
341 </directive>
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
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
344 <directive name="client_header_timeout">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
345 <syntax><argument>время</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
346 <default>60s</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
347 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
348 <context>server</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
349
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
350 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
351 Задаёт таймаут при чтении заголовка запроса клиента.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
352 Если по истечении этого времени клиент не передаст полностью заголовок,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
353 то клиенту возвращается ошибка
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
354 <http-status code="408" text="Request Time-out"/>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
355 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
356
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
357 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
358
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
359
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
360 <directive name="client_max_body_size">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
361 <syntax><argument>размер</argument></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
362 <default>1m</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
363 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
364 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
365 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
366
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
367 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
368 Задаёт максимально допустимый размер тела запроса клиента,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
369 указываемый в поле
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
370 <header>Content-Length</header>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
371 заголовка запроса.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
372 Если размер больше заданного, то клиенту возвращается ошибка
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
373 <http-status code="413" text="Request Entity Too Large"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
374 Следует иметь в виду, что
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
375 <!--link doc="/web/upload.xml"-->браузеры не умеют корректно показывать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
376 эту ошибку<!--/link-->.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
377 Установка аргумента <argument>размер</argument> в 0 отключает
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
378 проверку размера тела запроса клиента.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
379 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
380
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
381 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
382
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
383
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
384 <directive name="connection_pool_size">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
385 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
386 <default>256</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
387 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
388 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
389
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
390 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
391 Позволяет производить точную настройку выделений памяти
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
392 под конкретные соединения.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
393 Эта директива не оказывает существенного влияния на
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
394 производительность и её не следует использовать.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
395 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
396
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
397 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
398
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
399
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
400 <directive name="default_type">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
401 <syntax><argument>mime-тип</argument></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
402 <default>text/plain</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
403 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
404 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
405 <context>location</context>
76
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 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
408 Задаёт MIME-тип ответов по умолчанию.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
409 См. также директиву <link id="types"/>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
410 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
411
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
412 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
413
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 <directive name="directio">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
416 <syntax><argument>размер</argument> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
417 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
418 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
419 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
420 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
421 <appeared-in>0.7.7</appeared-in>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
422
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
423 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
424 Разрешает использовать флаги
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
425 <c-def>O_DIRECT</c-def> (FreeBSD, Linux),
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
426 <c-def>F_NOCACHE</c-def> (Mac OS X)
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
427 или функцию <c-func>directio</c-func> (Solaris)
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
428 при чтении файлов, размер которых больше либо равен указанному.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
429 Директива автоматически запрещает (0.7.15) использование
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
430 <link id="sendfile"/>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
431 для данного запроса.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
432 Рекомендуется использовать для больших файлов:
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
433 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
434 directio 4m;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
435 </example>
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
436 или при использовании <link id="aio"/> в Linux.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
437 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
438
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
439 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
440
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 <directive name="directio_alignment">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
443 <syntax><argument>размер</argument></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
444 <default>512</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
445 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
446 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
447 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
448 <appeared-in>0.8.11</appeared-in>
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>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
451 Устанавливает выравнивание для
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
452 <link id="directio"/>.
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
453 В большинстве случаев достаточно 512-байтового выравнивания, однако
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
454 при использовании XFS под Linux его нужно увеличить до 4K.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
455 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
456
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
457 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
458
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
459
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
460 <directive name="error_page">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
461 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
462 <argument>код</argument> ...
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
463 [<value>=</value>[<argument>ответ</argument>]]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
464 <argument>uri</argument>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
465 </syntax>
99
1d315ef37215 The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents: 79
diff changeset
466 <default/>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
467 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
468 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
469 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
470 <context>if в location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
471
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
472 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
473 Задаёт URI, который будет показываться для указанных ошибок.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
474 Директивы <code>error_page</code> наследуются с предыдущего уровня при условии,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
475 что на данном уровне не описаны свои директивы
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
476 <code>error_page</code>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
477 В значении URI можно использовать переменные.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
478 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
479
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
480 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
481 Пример:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
482 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
483 error_page 404 /404.html;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
484 error_page 502 503 504 /50x.html;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
485 error_page 403 http://example.com/forbidden.html;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
486 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
487 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
488
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
489 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
490 Кроме того, можно поменять код ответа на другой, например:
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
491 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
492 error_page 404 =200 /empty.gif;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
493 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
494 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
495
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
496 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
497 Если ошибочный ответ обрабатывается проксированным сервером или
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
498 FastCGI-сервером, и этот сервер может вернуть разные коды ответов,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
499 например, 200, 302, 401 или 404, то можно выдавать возвращаемый им код:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
500 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
501 error_page 404 = /404.php;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
502 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
503 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
504
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
505 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
506 Если при перенаправлении не нужно менять URI, то можно перенаправить
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
507 обработку ошибки в именованный location:
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
508 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
509 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
510 error_page 404 = @fallback;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
511 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
512
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
513 location @fallback {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
514 proxy_pass http://backend;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
515 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
516 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
517 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
518
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
519 </directive>
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
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
522 <directive name="if_modified_since">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
523 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
524 <value>off</value> |
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
525 <value>exact</value> |
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
526 <value>before</value>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
527 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
528 <default>exact</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
529 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
530 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
531 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
532 <appeared-in>0.7.24</appeared-in>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
533
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
534 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
535 Определяет, как сравнивать время модификации ответа с
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
536 временем в поле
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
537 <header>If-Modified-Since</header>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
538 заголовка запроса:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
539
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
540 <list type="tag">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
541
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
542 <tag-name><value>off</value></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
543 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
544 не проверять поле
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
545 <header>If-Modified-Since</header> заголовка запроса (0.7.34);
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
546 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
547
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
548 <tag-name><value>exact</value></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
549 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
550 точное совпадение;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
551 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
552
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
553 <tag-name><value>before</value></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
554 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
555 время модификации ответа меньше или равно времени, заданному в поле
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
556 <header>If-Modified-Since</header> заголовка запроса.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
557 </tag-desc>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
558
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
559 </list>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
560 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
561
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
562 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
563
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
564
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
565 <directive name="ignore_invalid_headers">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
566 <syntax><value>on</value> | <value>off</value></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
567 <default>on</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
568 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
569 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
570
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
571 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
572 Если включено, nginx игнорирует поля заголовка с недопустимыми именами.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
573 Допустимыми считаются имена, состоящие из английских букв, цифр, дефисов
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
574 и возможно знаков подчёркивания (последнее контролируется директивой
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
575 <link id="underscores_in_headers"/>).
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
576 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
577
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
578 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
579
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
580
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
581 <directive name="internal">
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
582 <syntax/>
99
1d315ef37215 The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents: 79
diff changeset
583 <default/>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
584 <context>location</context>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
585
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
586 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
587 Указывает, что location может использоваться только для внутренних запросов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
588 Для внешних запросов клиенту будет возвращаться ошибка
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
589 <http-status code="404" text="Not Found"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
590 Внутренними запросами являются:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
591
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
592 <list type="bullet">
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
593
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
594 <listitem>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
595 запросы, перенаправленные директивой <link id="error_page"/>;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
596 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
597
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
598 <listitem>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
599 подзапросы, формируемые командой
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
600 <command>include virtual</command>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
601 модуля
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
602 <link doc="ngx_http_ssi_module.xml">ngx_http_ssi_module</link>;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
603 ngx_http_ssi_module;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
604 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
605
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
606 <listitem>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
607 запросы, изменённые директивой
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
608 <link doc="ngx_http_rewrite_module.xml" id="rewrite"/>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
609 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
610
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
611 </list>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
612 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
613
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
614 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
615 Пример:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
616 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
617 error_page 404 /404.html;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
618
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
619 location /404.html {
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
620 internal;
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
621 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
622 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
623 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
624
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
625 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
626
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
627
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
628 <directive name="keepalive_disable">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
629 <syntax><value>none</value> | <argument>браузер</argument> ...</syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
630 <default>msie6 safari</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
631 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
632 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
633 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
634
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
635 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
636 Запрещает keep-alive соединения с некорректно ведущими себя браузерами.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
637 Аргументы <argument>браузер</argument> указывают, на какие браузеры это
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
638 распространяется.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
639 Значение <value>msie6</value> запрещает keep-alive соединения
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
640 со старыми версиями MSIE после получения запроса POST.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
641 Значение <value>safari</value> запрещает keep-alive соединения
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
642 с браузерами Safari.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
643 Значение <value>none</value> разрешает keep-alive соединения
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
644 со всеми браузерами.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
645 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
646
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
647 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
648
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
649
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
650 <directive name="keepalive_requests">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
651 <syntax><argument>число</argument></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
652 <default>100</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
653 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
654 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
655 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
656 <appeared-in>0.8.0</appeared-in>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
657
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
658 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
659 Задаёт максимальное число запросов, которые можно
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
660 сделать по одному keep-alive соединению.
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
661 После того, как будет сделано максимальное число запросов,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
662 соединение закрывается.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
663 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
664
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
665 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
666
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
667
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
668 <directive name="keepalive_timeout">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
669 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
670 <argument>таймаут</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
671 [<argument>заголовок_таймаута</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
672 </syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
673 <default>75s</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
674 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
675 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
676 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
677
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
678 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
679 Первый аргумент задаёт таймаут, в течение которого keep-alive
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
680 соединение с клиентом не будет закрыто со стороны сервера.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
681 Второй необязательный параметр задаёт значение в поле
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
682 <header>Keep-Alive: timeout=<argument>время</argument></header>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
683 заголовка ответа.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
684 Два аргумента могут отличаться друг от друга.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
685 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
686
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
687 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
688 Поле
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
689 <header>Keep-Alive: timeout=<argument>время</argument></header>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
690 заголовка понимают Mozilla и Konqueror.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
691 MSIE сам закрывает keep-alive соединение примерно через 60 секунд.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
692 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
693
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
694 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
695
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
696
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
697 <directive name="large_client_header_buffers">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
698 <syntax><argument>число размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
699 <default>4 8k</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
700 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
701 <context>server</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
702
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
703 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
704 Задаёт максимальное <argument>число</argument> и <argument>размер</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
705 буферов для чтения большого заголовка запроса клиента.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
706 Строка запроса не должна превышать размера одного буфера, иначе клиенту
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
707 возвращается ошибка
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
708 <http-status code="414" text="Request-URI Too Large"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
709 Поле заголовка запроса также не должно превышать размера одного буфера,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
710 иначе клиенту возвращается ошибка
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
711 <http-status code="400" text="Bad Request"/>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
712 Буферы выделяются только по мере необходимости.
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
713 По умолчанию размер одного буфера равен 8K байт.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
714 Если по окончании обработки запроса соединение переходит в состояние
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
715 keep-alive, эти буферы освобождаются.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
716 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
717
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
718 </directive>
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
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
721 <directive name="limit_except">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
722 <syntax block="yes"><argument>метод</argument> ...</syntax>
99
1d315ef37215 The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents: 79
diff changeset
723 <default/>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
724 <context>location</context>
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>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
727 Ограничивает HTTP-методы, доступные внутри location.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
728 Аргумент <argument>метод</argument> может быть одним из
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
729 <value>GET</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
730 <value>HEAD</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
731 <value>POST</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
732 <value>PUT</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
733 <value>DELETE</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
734 <value>MKCOL</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
735 <value>COPY</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
736 <value>MOVE</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
737 <value>OPTIONS</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
738 <value>PROPFIND</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
739 <value>PROPPATCH</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
740 <value>LOCK</value>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
741 <value>UNLOCK</value>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
742 или
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
743 <value>PATCH</value>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
744 Если разрешён метод <value>GET</value>, то метод
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
745 <value>HEAD</value> также будет разрешён.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
746 Доступ к остальным методам может быть ограничен при помощи директив модулей
79
0a45870d0160 Fixed cross-document links to use doc and id.
Maxim Dounin <mdounin@mdounin.ru>
parents: 76
diff changeset
747 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
748 и
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
749 <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
750 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
751 limit_except GET {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
752 allow 192.168.1.0/32;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
753 deny all;
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 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
756 Обратите внимание, что данное ограничение действует для всех методов,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
757 <emphasis>кроме</emphasis> GET и HEAD.
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="limit_rate">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
764 <syntax><argument>скорость</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
765 <default>0</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
766 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
767 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
768 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
769 <context>if в location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
770
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
771 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
772 Ограничивает скорость передачи ответа клиенту.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
773 Скорость задаётся в байтах в секунду.
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
774 Значение 0 (установка по умолчанию) отключает ограничение скорости.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
775 <!--
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
776 Чем меньше скорость, тем более аккуратным будет ограничение.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
777 -->
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
778 Ограничение срабатывает только для одного соединения, то есть если
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
779 клиент откроет 2 соединения, то суммарная скорость будет в 2 раза
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
780 выше заданного ограничения.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
781 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
782
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
783 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
784 Если необходимо ограничить скорость для части клиентов на уровне
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
785 <link id="server">сервера</link>, то директива <code>limit_rate</code>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
786 для этого не подходит.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
787 Вместо этого следует задать желаемое ограничение скорости в переменной
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
788 <var>$limit_rate</var>:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
789 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
790 server {
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
791
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
792 if ($slow) {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
793 set $limit_rate 4k;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
794 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
795
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
796 ...
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
797 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
798 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
799 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
800
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
801 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
802
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
803
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
804 <directive name="limit_rate_after">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
805 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
806 <default>0</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
807 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
808 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
809 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
810 <context>if в location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
811 <appeared-in>0.8.0</appeared-in>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
812
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
813 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
814 Задаёт начальный объём данных, после передачи которого начинает
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
815 ограничиваться скорость передачи ответа клиенту.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
816 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
817
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
818 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
819 Пример:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
820 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
821 location /flv/ {
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
822 flv;
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
823 limit_rate_after 500k;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
824 limit_rate 50k;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
825 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
826 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
827 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
828
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
829 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
830
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
831
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
832 <directive name="lingering_close">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
833 <syntax><value>off</value> | <value>on</value> | <value>always</value></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
834 <default>on</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
835 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
836 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
837 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
838 <appeared-in>1.1.0</appeared-in>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
839 <appeared-in>1.0.6</appeared-in>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
840
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
841 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
842 Управляет закрытием соединений с клиентами.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
843 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
844
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
845 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
846 Со значение по умолчанию “<value>on</value>” nginx будет
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
847 <link id="lingering_timeout">ждать</link> и
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
848 <link id="lingering_time">обрабатывать</link> дополнительные данные,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
849 поступающие от клиента, перед полным закрытием соединения, но только
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
850 если эвристика указывает на то, что клиент может ещё послать данные.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
851 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
852
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
853 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
854 Со значением “<value>always</value>” nginx всегда будет
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
855 ждать и обрабатывать дополнительные данные, поступающие от клиента.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
856 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
857
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
858 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
859 Со значением “<value>off</value>” nginx не будет ждать поступления
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
860 дополнительных данных и сразу же закроет соединение.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
861 Это нарушает протокол, поэтому не следует это использовать без нужды.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
862 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
863
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
864 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
865
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
866
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
867 <directive name="lingering_time">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
868 <syntax><argument>время</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
869 <default>30s</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
870 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
871 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
872 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
873
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
874 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
875 Если действует <link id="lingering_close"/>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
876 эта директива задаёт максимальное время, в течение которого nginx
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
877 будет обрабатывать (читать и игнорировать) дополнительные данные,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
878 поступающие от клиента.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
879 По прошествии этого времени соединение будет закрыто, даже если
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
880 будут ещё данные.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
881 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
882
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
883 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
884
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
885
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
886 <directive name="lingering_timeout">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
887 <syntax><argument>время</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
888 <default>5s</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
889 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
890 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
891 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
892
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
893 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
894 Если действует <link id="lingering_close"/>, эта директива задаёт
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
895 максимальное время ожидания поступления дополнительных данных от клиента.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
896 Если в течение этого времени данные не были получены, соединение закрывается.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
897 Иначе данные читаются и игнорируются, затем nginx снова ждёт поступления данных.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
898 Цикл “ждать-читать-игнорировать” повторяется, но не дольше чем задано
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
899 директивой <link id="lingering_time"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
900 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
901
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
902 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
903
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
904
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
905 <directive name="listen">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
906 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
907 <argument>адрес</argument>[:<argument>порт</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
908 [<parameter>default_server</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
909 [<parameter>setfib</parameter>=<argument>число</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
910 [<parameter>backlog</parameter>=<argument>число</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
911 [<parameter>rcvbuf</parameter>=<argument>размер</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
912 [<parameter>sndbuf</parameter>=<argument>размер</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
913 [<parameter>accept_filter</parameter>=<argument>фильтр</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
914 [<parameter>deferred</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
915 [<parameter>bind</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
916 [<parameter>ipv6only</parameter>=<value>on</value>|<value>off</value>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
917 [<parameter>ssl</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
918 [<parameter>so_keepalive</parameter>=<value>on</value>|<value>off</value>|[<argument>keepidle</argument>]:[<argument>keepintvl</argument>]:[<argument>keepcnt</argument>]]</syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
919 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
920 <argument>порт</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
921 [<parameter>default_server</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
922 [<parameter>setfib</parameter>=<argument>число</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
923 [<parameter>backlog</parameter>=<argument>число</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
924 [<parameter>rcvbuf</parameter>=<argument>размер</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
925 [<parameter>sndbuf</parameter>=<argument>размер</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
926 [<parameter>accept_filter</parameter>=<argument>фильтр</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
927 [<parameter>deferred</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
928 [<parameter>bind</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
929 [<parameter>ipv6only</parameter>=<value>on</value>|<value>off</value>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
930 [<parameter>ssl</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
931 [<parameter>so_keepalive</parameter>=<value>on</value>|<value>off</value>|[<argument>keepidle</argument>]:[<argument>keepintvl</argument>]:[<argument>keepcnt</argument>]]</syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
932 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
933 <value>unix:</value><argument>путь</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
934 [<parameter>default_server</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
935 [<parameter>backlog</parameter>=<argument>число</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
936 [<parameter>rcvbuf</parameter>=<argument>размер</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
937 [<parameter>sndbuf</parameter>=<argument>размер</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
938 [<parameter>accept_filter</parameter>=<argument>фильтр</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
939 [<parameter>deferred</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
940 [<parameter>bind</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
941 [<parameter>ssl</parameter>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
942 [<parameter>so_keepalive</parameter>=<value>on</value>|<value>off</value>|[<argument>keepidle</argument>]:[<argument>keepintvl</argument>]:[<argument>keepcnt</argument>]]</syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
943 <default>*:80 | *:8000</default>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
944 <context>server</context>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
945
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
946 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
947 Задаёт <argument>адрес</argument> и <argument>порт</argument> для IP
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
948 или <argument>путь</argument> для UNIX-сокета,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
949 на которых сервер будет принимать запросы.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
950 Можно указать только <argument>адрес</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
951 или только <argument>порт</argument>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
952 Кроме того, <argument>адрес</argument> может быть именем хоста, например:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
953 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
954 listen 127.0.0.1:8000;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
955 listen 127.0.0.1;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
956 listen 8000;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
957 listen *:8000;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
958 listen localhost:8000;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
959 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
960 IPv6-адреса (0.7.36) задаются в квадратных скобках:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
961 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
962 listen [::]:8000;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
963 listen [fe80::1];
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
964 </example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
965 UNIX-сокеты (0.8.21) задаются при помощи префикса “<code>unix:</code>”:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
966 <example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
967 listen unix:/var/run/nginx.sock;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
968 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
969 </para>
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>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
972 Если указан только <argument>адрес</argument>, то используется порт 80.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
973 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
974
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
975 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
976 Если директива не указана, то используется либо <code>*:80</code>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
977 (если nginx работает с привилегиями суперпользователя),
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
978 либо <code>*:8000</code>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
979 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
980
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
981 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
982 Если у директивы есть параметр <parameter>default_server</parameter>, то сервер,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
983 в котором описана эта директива, будет сервером по умолчанию для указанной пары
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
984 <argument>адрес</argument>:<argument>порт</argument>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
985 Если же директив с параметром <parameter>default_server</parameter> нет, то
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
986 сервером по умолчанию будет первый сервер, в котором описана пара
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
987 <argument>адрес</argument>:<argument>порт</argument>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
988 адрес:порт.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
989 <note>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
990 До версии 0.8.21 этот параметр назывался просто
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
991 <parameter>default</parameter>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
992 </note>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
993 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
994
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
995 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
996 В директиве <code>listen</code> можно также указать несколько
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
997 дополнительных параметров, специфичных для системных вызовов
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
998 <c-func>listen</c-func> и <c-func>bind</c-func>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
999 Эти параметры можно задать в любой директиве <code>listen</code>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1000 но только один раз для указанной пары
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1001 <argument>адрес</argument>:<argument>порт</argument>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1002 <note>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1003 До версии 0.8.21 их можно было указывать лишь в директиве
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1004 <code>listen</code> с параметром <parameter>default</parameter>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1005 </note>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1006 <list type="tag">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1007
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1008 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1009 <parameter>setfib</parameter>=<argument>число</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1010 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1011 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1012 этот параметр (0.8.44) задаёт для слушающего сокета соответствующую
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1013 таблицу маршрутизации (FIB).
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1014 В настоящий момент это работает только на FreeBSD.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1015 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1016
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1017 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1018 <parameter>backlog</parameter>=<argument>число</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1019 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1020 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1021 задаёт параметр <parameter>backlog</parameter> в вызове
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1022 <c-func>listen</c-func>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1023 По умолчанию <parameter>backlog</parameter> равен -1 для FreeBSD
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1024 и 511 для других платформ.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1025 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1026
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1027 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1028 <parameter>rcvbuf</parameter>=<argument>размер</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1029 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1030 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1031 задаёт параметр <c-def>SO_RCVBUF</c-def> для слушающего сокета
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1032 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1033
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1034 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1035 <parameter>sndbuf</parameter>=<argument>размер</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1036 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1037 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1038 задаёт параметр <c-def>SO_SNDBUF</c-def> для слушающего сокета
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1039 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1040
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1041 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1042 <parameter>accept_filter</parameter>=<argument>фильтр</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1043 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1044 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1045 задаёт название accept-фильтра.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1046 Работает только на FreeBSD, можно использовать два фильтра —
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1047 <value>dataready</value> и <value>httpready</value>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1048 По сигналу <c-def>SIGHUP</c-def> accept-фильтр можно менять только в
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1049 последних версиях FreeBSD, начиная с 6.0, 5.4-STABLE и 4.11-STABLE.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1050 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1051
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1052 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1053 <parameter>deferred</parameter>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1054 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1055 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1056 указывает использовать отложенный <c-func>accept</c-func> на Linux
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1057 с помощью опции <c-def>TCP_DEFER_ACCEPT</c-def>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1058 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1059
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1060 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1061 <parameter>bind</parameter>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1062 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1063 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1064 указывает, что для данной пары
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1065 <argument>адрес</argument>:<argument>порт</argument> нужно делать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1066 <c-func>bind</c-func> отдельно.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1067 Дело в том, что если описаны несколько директив <code>listen</code>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1068 с одинаковым портом, но разными адресами и одна из директив
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1069 <code>listen</code> слушает на всех адресах для данного порта
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1070 (<code>*</code>:<argument>порт</argument>, то nginx сделает
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1071 <c-func>bind</c-func> только на <code>*</code>:<argument>порт</argument>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1072 Необходимо заметить, что в этом случае для определения адреса, на которой
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1073 пришло соединение, делается системный вызов <c-func>getsockname</c-func>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1074 Если же используются параметры <parameter>backlog</parameter>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1075 <parameter>rcvbuf</parameter>, <parameter>sndbuf</parameter>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1076 <parameter>accept_filter</parameter>, <parameter>deferred</parameter>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1077 или <parameter>so_keepalive</parameter>, то для данной пары
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1078 <argument>адрес</argument>:<argument>порт</argument> всегда делается
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1079 отдельный вызов <c-func>bind</c-func>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1080 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1081
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1082 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1083 <parameter>ipv6only</parameter>=<value>on</value>|<value>off</value>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1084 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1085 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1086 параметр (0.7.42) задаёт значение параметра <c-def>IPV6_V6ONLY</c-def>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1087 для слушающего сокета.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1088 Установить этот параметр можно только один раз на старте.
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1089 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1090
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1091 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1092 <parameter>ssl</parameter>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1093 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1094 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1095 этот параметр (0.7.14) не имеет отношения к системным вызовам
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1096 <c-func>listen</c-func> и <c-func>bind</c-func>, а позволяет указать,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1097 что все соединения, принимаемые на этом порту, должны работать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1098 в режиме SSL.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1099 Это позволяет задать компактную конфигурацию для сервера,
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1100 работающего сразу в двух режимах — HTTP и HTTPS.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1101 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1102 listen 80;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1103 listen 443 default ssl;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1104 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1105 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1106
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1107 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1108 <parameter>so_keepalive</parameter>=<value>on</value>|<value>off</value>|[<argument>keepidle</argument>]:[<argument>keepintvl</argument>]:[<argument>keepcnt</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1109 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1110 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1111 этот параметр (1.1.11) конфигурирует для слушающего сокета
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1112 поведение “TCP keepalive”.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1113 Если этот параметр опущен, то для сокета будут действовать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1114 стандартные системные настройки.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1115 Если он установлен в значение “<value>on</value>”, то для сокета
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1116 включается опция <c-def>SO_KEEPALIVE</c-def>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1117 Если он установлен в значение “<value>off</value>”, то для сокета
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1118 опция <c-def>SO_KEEPALIVE</c-def> выключается.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1119 Некоторые операционные системы поддерживают настройку параметров
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1120 “TCP keepalive” на уровне сокета посредством опций
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1121 <c-def>TCP_KEEPIDLE</c-def>, <c-def>TCP_KEEPINTVL</c-def> и
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1122 <c-def>TCP_KEEPCNT</c-def>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1123 На таких системах (в настоящий момент это Linux 2.4+ и NetBSD 5+)
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1124 их можно сконфигурировать с помощью аргументов <argument>keepidle</argument>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1125 <argument>keepintvl</argument> и <argument>keepcnt</argument>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1126 Один или два аргумента могут быть опущены, в таком случае для
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1127 соответствующей опции сокета будут действовать стандартные
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1128 системные настройки.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1129 Например,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1130 <example>so_keepalive=30m::10</example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1131 установит таймаут бездействия (<c-def>TCP_KEEPIDLE</c-def>) в 30 минут,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1132 для интервала проб (<c-def>TCP_KEEPINTVL</c-def>) будет действовать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1133 стандартная системная настройка, а счётчик проб (<c-def>TCP_KEEPCNT</c-def>)
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1134 будет равен 10.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1135 </tag-desc>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1136
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1137 </list>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1138 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1139
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1140 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1141 Пример:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1142 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1143 listen 127.0.0.1 default accept_filter=dataready backlog=1024;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1144 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1145 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1146
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1147 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1148
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1149
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1150 <directive name="location">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1151 <syntax block="yes">[
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1152 <value>=</value> |
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1153 <value>~</value> |
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1154 <value>~*</value> |
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1155 <value>^~</value>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1156 ] <argument>uri</argument>
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
1157 </syntax>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1158 <syntax block="yes"><value>@</value><argument>имя</argument></syntax>
99
1d315ef37215 The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents: 79
diff changeset
1159 <default/>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1160 <context>server</context>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1161 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1162
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1163 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1164 Устанавливает конфигурацию в зависимости от URI запроса.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1165 location можно задать префиксной строкой или регулярным выражением.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1166 Регулярные выражения задаются либо с префиксом “<value>~*</value>”
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1167 (для поиска совпадения без учёта регистра символов),
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1168 либо с префиксом “<value>~</value>” (с учётом регистра).
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1169 Чтобы найти location, соответствующий запросу, вначале проверяются
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1170 location'ы, заданные префиксными строками (префиксные location'ы).
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1171 Среди них ищется максимальное совпадение.
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1172 Затем проверяются регулярные выражения, в порядке их следования
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1173 в конфигурационном файле.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1174 Проверка регулярных выражений прекращается после первого же совпадения,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1175 и используется соответствующая конфигурация.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1176 Если совпадение с регулярным выражением не найдено, то используется
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1177 конфигурация максимально совпавшего префиксного location'а.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1178 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1179
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1180 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1181 location'ы могут быть вложенными, с некоторыми исключениями,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1182 о которых говорится ниже.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1183 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1184
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1185 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1186 Для операционных систем, нечувствительных к регистру символов, таких
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1187 как Mac OS X и Cygwin, сравнение с префиксными строками производится
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1188 без учёта регистра (0.7.7).
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1189 Однако, сравнение ограничено только однобайтными locale'ями.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1190 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1191
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1192 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1193 Регулярные выражения могут содержать выделения (0.7.40), которые могут
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1194 затем использоваться в других директивах.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1195 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1196
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1197 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1198 Если у максимального совпавшего префиксного location'а указан префикс
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1199 “<value>^~</value>”, то регулярные выражения не проверяются.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1200 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1201
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1202 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1203 Кроме того, с помощью префикса “<value>=</value>” можно задать точное
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1204 совпадение URI и location.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1205 При точном совпадении поиск сразу же прекращается.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1206 Например, если запрос “<code>/</code>” случается часто, то
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1207 указав “<code>location = /</code>”, можно ускорить обработку
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1208 этих запросов, так как поиск прекратится после первого же сравнения.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1209 Очевидно, что такой location не может иметь вложенные location'ы.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1210 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1211
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1212 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1213 <note>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1214 В версиях с 0.7.1 по 0.8.41, если запрос точно совпал с префиксным
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1215 location'ом без префиксов “<value>=</value>” и “<value>^~</value>”,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1216 то поиск тоже сразу же прекращается и регулярные выражения также
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1217 не проверяются.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1218 </note>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1219 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1220
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1221 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1222 Проиллюстрируем вышесказанное примером:
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1223 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1224 location = / {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1225 [ конфигурация А ]
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1226 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1227
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1228 location / {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1229 [ конфигурация Б ]
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1230 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1231
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1232 location ^~ /images/ {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1233 [ конфигурация В ]
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1234 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1235
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1236 location ~* \.(gif|jpg|jpeg)$ {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1237 [ конфигурация Г ]
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1238 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1239 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1240 Для запроса “<code>/</code>” будет выбрана конфигурация А,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1241 для запроса “<code>/documents/document.html</code>” — конфигурация Б,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1242 для запроса “<code>/images/1.gif</code>” — конфигурация В,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1243 а для запроса “<code>/documents/1.jpg</code>” — конфигурация Г.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1244 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1245
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1246 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1247 Префикс “<value>@</value>” задаёт именованный location.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1248 Такой location не используется при обычной обработке запросов, а
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1249 предназначен только для перенаправления в него запросов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1250 Такие location'ы не могут быть вложенными и не могут содержать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1251 вложенные location'ы.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1252 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1253
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1254 <!--
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1255 <migration from="Apache" directive="Location" />
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1256 -->
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1257
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1258 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1259
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1260
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1261 <directive name="log_not_found">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1262 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1263 <default>on</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1264 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1265 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1266 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1267
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1268 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1269 Разрешает или запрещает записывать в
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1270 <link doc="../ngx_core_module.xml" id="error_log"/>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1271 ошибки о том, что файл не найден.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1272 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1273
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1274 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1275
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1276
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1277 <directive name="log_subrequest">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1278 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1279 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1280 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1281 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1282 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1283
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1284 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1285 Разрешает или запрещает записывать в
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
1286 <link doc="ngx_http_log_module.xml" id="access_log"/>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1287 подзапросы.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1288 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1289
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1290 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1291
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1292
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1293 <directive name="max_ranges">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1294 <syntax><argument>число</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1295 <default/>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1296 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1297 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1298 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1299
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1300 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1301 Ограничивает максимальное допустимое число диапазонов в запросах с
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1302 указанием диапазона запрашиваемых байт (byte-range requests).
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1303 Запросы, превышающие указанное ограничение, обрабатываются как
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1304 если бы они не содержали указания диапазонов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1305 По умолчанию ограничения нет.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1306 Значение 0 полностью запрещает поддержку диапазонов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1307 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1308
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1309 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1310
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1311
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1312 <directive name="merge_slashes">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1313 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1314 <default>on</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1315 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1316 <context>server</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1317
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1318 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1319 Разрешает или запрещает преобразование URI путём замены двух и более подряд
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1320 идущих слэшей (“<code>/</code>”) в один.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1321 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1322
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1323 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1324 Необходимо иметь ввиду, что это преобразование необходимо для корректной
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1325 проверки префиксных строк и регулярных выражений.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1326 Если его не делать, то запрос “<code>//scripts/one.php</code>” не попадёт в
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1327 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1328 location /scripts/ {
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1329 ...
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1330 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1331 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1332 и может быть обслужен как статический файл.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1333 Поэтому он преобразуется к виду “<code>/scripts/one.php</code>”.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1334 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1335
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1336 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1337 Запрет преобразования может понадобиться, если в URI используются имена,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1338 закодированные методом base64, в котором задействован символ “<code>/</code>”.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1339 Однако по соображениям безопасности лучше избегать отключения преобразования.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1340 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1341
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1342 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1343 Если директива указана на уровне
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1344 <link id="server"/>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1345 в сервере по умолчанию, то её значение распространяется на
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1346 все виртуальные сервера, слушающие на том же адресе и порту.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1347 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1348
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1349 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1350
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1351
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1352 <directive name="msie_padding">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1353 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1354 <default>on</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1355 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1356 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1357 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1358
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1359 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1360 Разрешает или запрещает добавлять в ответы для MSIE со статусом больше 400
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1361 комментарий для увеличения размера ответа до 512 байт.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1362 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1363
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1364 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1365
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1366
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1367 <directive name="msie_refresh">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1368 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1369 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1370 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1371 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1372 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1373
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1374 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1375 Разрешает или запрещает выдавать для MSIE клиентов refresh'ы вместо
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1376 перенаправлений.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1377 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1378
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1379 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1380
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1381
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1382 <directive name="open_file_cache">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1383 <syntax><value>off</value></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1384 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1385 <parameter>max</parameter>=<argument>N</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1386 [<parameter>inactive</parameter>=<argument>время</argument>]
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1387 </syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1388 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1389 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1390 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1391 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1392
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1393 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1394 Задаёт кэш, в котором могут храниться:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1395 <list type="bullet">
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1396
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1397 <listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1398 дескрипторы открытых файлов, информация об их размерах и времени модификации;
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1399 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1400
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1401 <listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1402 информация о существовании каталогов;
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1403 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1404
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1405 <listitem>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1406 информация об ошибках поиска файла — “нет файла”, “нет прав на чтение”
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1407 и тому подобное.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1408 <note>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1409 Кэширование ошибок нужно разрешить отдельно директивой
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1410 <link id="open_file_cache_errors"/>.
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1411 </note>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1412 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1413
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1414 </list>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1415 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1416
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1417 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1418 У директивы есть следующие параметры:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1419 <list type="tag">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1420
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1421 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1422 <parameter>max</parameter>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1423 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1424 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1425 задаёт максимальное число элементов в кэше;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1426 при переполнении кэша удаляются наиболее давно не используемые элементы (LRU);
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1427 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1428
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1429 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1430 <parameter>inactive</parameter>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1431 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1432 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1433 задаёт время, после которого элемент кэша удаляется, если к нему
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1434 не было обращений в течение этого времени; по умолчанию 60 секунд;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1435 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1436
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1437 <tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1438 <value>off</value>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1439 </tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1440 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1441 запрещает кэш.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1442 </tag-desc>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1443
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1444 </list>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1445 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1446
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1447 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1448 Пример:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1449 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1450 open_file_cache max=1000 inactive=20s;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1451 open_file_cache_valid 30s;
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1452 open_file_cache_min_uses 2;
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1453 open_file_cache_errors on;
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1454 <!--
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1455 open_file_cache_events on;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1456 -->
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1457 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1458 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1459
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1460 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1461
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1462
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1463 <directive name="open_file_cache_errors">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1464 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1465 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1466 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1467 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1468 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1469
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1470 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1471 Разрешает или запрещает кэширование ошибок поиска файлов в
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1472 <link id="open_file_cache"/>.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1473 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1474
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1475 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1476
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1477
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1478 <!--
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1479
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1480 <directive name="open_file_cache_events">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1481 <syntax><value>on</value> | <value>off</value></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1482 <default>off</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1483 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1484 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1485 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1486
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1487 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1488 Разрешает использование событий ядра для проверки актуальности элементов
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1489 <link id="open_file_cache"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1490 Эта директива работает только совместно с методом
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1491 <link doc="../events.xml" id="kqueue"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1492 Заметьте, что только NetBSD&nbsp;2.0+ и FreeBSD&nbsp;6.0+
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1493 поддерживают события для файловых систем произвольного типа.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1494 Другие операционные системы поддерживают события только для
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1495 основных файловых систем, таких как UFS или FFS.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1496 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1497
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1498 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1499
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1500 -->
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1501
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1502
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1503 <directive name="open_file_cache_min_uses">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1504 <syntax><argument>число</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1505 <default>1</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1506 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1507 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1508 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1509
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1510 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1511 Задаёт минимальное <argument>число</argument> обращений к файлу
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1512 в течение времени, заданного параметром <parameter>inactive</parameter>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1513 директивы <link id="open_file_cache"/>, после которого дескриптор
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1514 файла будет оставаться открытым в кэше.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1515 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1516
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1517 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1518
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1519
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1520 <directive name="open_file_cache_valid">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1521 <syntax><argument>время</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1522 <default>60s</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1523 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1524 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1525 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1526
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1527 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1528 Определяет время, через которое следует проверять актуальность информации
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1529 об элементе в
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1530 <link id="open_file_cache"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1531 <!--
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1532 При включенном
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1533 <link id="open_file_cache_events"/>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1534 открытые дескрипторы файлов проверяются лишь единожды, а затем обновляются
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1535 по факту их изменения.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1536 -->
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1537 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1538
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1539 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1540
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1541
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1542 <directive name="optimize_server_names">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1543 <syntax><value>on</value> | <value>off</value></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1544 <default>off</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1545 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1546 <context>server</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1547
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1548 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1549 Директива устарела, вместо неё следует использовать директиву
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1550 <link id="server_name_in_redirect"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1551 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1552
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1553 <!--
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1554 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1555 Разрешает или запрещает оптимизировать проверку имени хоста в name-based
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1556 виртуальных серверах.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1557 Проверка в частности влияет на имя хоста, используемого в перенаправлениях.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1558 Если оптимизация разрешена и все name-based сервера, слушающие на одной
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1559 паре адрес:порт, имеют одинаковую конфигурацию, то во время исполнения запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1560 имена не проверяются и в перенаправлениях используется первое имя сервера.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1561 Если в перенаправлении нужно использовать имя хоста, переданное клиентом,
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1562 то оптимизацию нужно выключить.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1563 </para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1564 -->
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1565
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1566 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1567
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1568
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1569 <directive name="port_in_redirect">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1570 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1571 <default>on</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1572 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1573 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1574 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1575
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1576 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1577 Разрешает или запрещает указывать порт в перенаправлениях, выдаваемых nginx'ом.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1578 </para>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1579
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1580 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1581 См. также директиву <link id="server_name_in_redirect"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1582 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1583
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1584 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1585
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1586
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1587 <directive name="postpone_output">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1588 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1589 <default>1460</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1590 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1591 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1592 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1593
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1594 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1595 Если это возможно, то отправка данных клиенту будет отложена пока nginx не
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1596 накопит по крайней мере указанное количество байт для отправки.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1597 Значение 0 запрещает отложенную отправку данных.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1598 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1599
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1600 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1601
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1602
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1603 <directive name="read_ahead">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1604 <syntax><argument>размер</argument></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1605 <default>0</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1606 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1607 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1608 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1609
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1610 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1611 Задаёт ядру размер предчтения при работе с файлами.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1612 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1613
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1614 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1615 На Linux используется системный вызов
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1616 <code>posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL)</code>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1617 поэтому аргумент <argument>размер</argument> там игнорируется.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1618 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1619
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1620 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1621 На FreeBSD используется системный вызов
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1622 <code>fcntl(O_READAHEAD,</code><argument>размер</argument><code>)</code>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1623 появившийся во FreeBSD&nbsp;9.0-CURRENT.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1624 Для FreeBSD&nbsp;7 необходимо установить
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1625 <link url="http://sysoev.ru/freebsd/patch.readahead.txt">патч</link>.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1626 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1627
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1628 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1629
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1630
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1631 <directive name="recursive_error_pages">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1632 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1633 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1634 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1635 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1636 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1637
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1638 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1639 Разрешает или запрещает делать несколько перенаправлений через директиву
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1640 <link id="error_page"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1641 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1642
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1643 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1644
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1645
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1646 <directive name="request_pool_size">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1647 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1648 <default>4k</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1649 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1650 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1651
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1652 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1653 Позволяет производить точную настройку выделений памяти
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1654 под конкретные запросы.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1655 Эта директива не оказывает существенного влияния на
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1656 производительность и её не следует использовать.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1657 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1658
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1659 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1660
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1661
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1662 <directive name="reset_timedout_connection">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1663 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1664 <value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1665 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1666 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1667 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1668 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1669
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1670 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1671 Разрешает или запрещает сброс соединений по таймауту.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1672 Сброс делается следующим образом — перед закрытием сокета для него
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1673 ставится опция
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1674 <c-def>SO_LINGER</c-def>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1675 с таймаутом 0.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1676 После чего при закрытии сокета клиенту отсылается TCP RST, а вся память,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1677 связанная с этим сокетом, освобождается.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1678 Это позволяет избежать длительного нахождения уже закрытого сокета в
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1679 состоянии FIN_WAIT1 с заполненными буферами.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1680 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1681
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1682 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1683 Необходимо отметить, что keep-alive соединения по истечении таймаута
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1684 закрываются обычным образом.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1685 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1686
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1687 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1688
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1689
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1690 <directive name="resolver">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1691 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1692 <argument>адрес</argument> ...
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1693 [<parameter>valid</parameter>=<argument>время</argument>]
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1694 </syntax>
99
1d315ef37215 The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents: 79
diff changeset
1695 <default/>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1696 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1697 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1698 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1699
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1700 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1701 Задаёт серверы DNS, используемые для преобразования имён апстрим серверов
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1702 в адреса, например:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1703 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1704 resolver 127.0.0.1 192.0.2.1;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1705 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1706 Аргумент <argument>адрес</argument> может быть задан либо
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1707 IPv4-адресом, либо именем хоста;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1708 во втором случае используется первый полученный IPv4-адрес.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1709 Серверы DNS опрашиваются циклически.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1710 <note>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1711 До версии 1.1.7 можно было задать лишь один DNS-сервер.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1712 </note>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1713 По умолчанию nginx кэширует ответы, используя значение TTL из ответа.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1714 Необязательный параметр <parameter>valid</parameter> позволяет это
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1715 переопределить:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1716 <example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1717 resolver 127.0.0.1 192.0.2.1 valid=30s;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1718 </example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1719 <note>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1720 До версии 1.1.9 настройка времени кэширования была невозможна
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1721 и nginx всегда кэшировал ответы на срок в 5 минут.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1722 </note>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1723 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1724
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1725 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1726
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1727
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1728 <directive name="resolver_timeout">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1729 <syntax><argument>время</argument></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1730 <default>30s</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1731 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1732 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1733 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1734
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1735 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1736 Задаёт таймаут для преобразования имени в адрес, например:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1737 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1738 resolver_timeout 5s;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1739 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1740 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1741
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1742 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1743
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1744
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1745 <directive name="root">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1746 <syntax><argument>путь</argument></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1747 <default>html</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1748 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1749 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1750 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1751 <context>if в location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1752
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1753 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1754 Задаёт корневой каталог для запросов.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1755 Например, при такой конфигурации
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1756 <example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1757 location /i/ {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1758 root /data/w3;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1759 }
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1760 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1761 в ответ на запрос “<code>/i/top.gif</code>” будет отдан файл
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1762 <path>/data/w3/i/top.gif</path>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1763 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1764
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1765 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1766 В значении аргумента <argument>путь</argument> можно использовать переменные,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1767 кроме <var>$document_root</var> и <var>$realpath_root</var>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1768 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1769
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1770 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1771 Путь к файлу формируется путём простого добавления URI к значению директивы
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1772 <code>root</code>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1773 Если же URI необходимо поменять, следует воспользоваться директивой
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1774 <link id="alias"/>.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1775 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1776
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1777 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1778
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1779
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1780 <directive name="satisfy">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1781 <syntax><value>all</value> | <value>any</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1782 <default>all</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1783 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1784 <context>server</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1785 <context>location</context>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1786
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1787 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1788 Разрешает доступ, если оба (<value>all</value>)
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1789 или хотя бы один (<value>any</value>) из модулей
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1790 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1791 и <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1792 разрешают доступ.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1793 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1794
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1795 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1796 Пример:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1797 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1798 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1799 satisfy any;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1800
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1801 allow 192.168.1.0/32;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1802 deny all;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1803
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1804 auth_basic "closed site";
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1805 auth_basic_user_file conf/htpasswd;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1806 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1807 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1808 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1809
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1810 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1811
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1812
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1813 <directive name="satisfy_any">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1814 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1815 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1816 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1817 <context>server</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1818 <context>location</context>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1819
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1820 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1821 Эта директива была переименована в директиву
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1822 <link id="satisfy">satisfy any</link>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1823 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1824
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1825 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1826
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1827
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1828 <directive name="send_lowat">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1829 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1830 <default>0</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1831 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1832 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1833 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1834
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1835 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1836 При установке в ненулевое значение nginx будет пытаться минимизировать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1837 число операций отправки на клиентских сокетах либо при помощи флага
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1838 <c-def>NOTE_LOWAT</c-def> метода
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1839 <link doc="../events.xml" id="kqueue"/>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1840 либо при помощи опции сокета <c-def>SO_SNDLOWAT</c-def>,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1841 с указанным размером.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1842 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1843
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1844 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1845 Эта директива игнорируется на Linux, Solaris и Windows.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1846 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1847
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1848 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1849
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1850
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1851 <directive name="send_timeout">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1852 <syntax><argument>время</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1853 <default>60s</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1854 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1855 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1856 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1857
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1858 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1859 Задаёт таймаут при передаче ответа клиенту.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1860 Таймаут устанавливается не на всю передачу ответа,
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1861 а только между двумя операциями записями.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1862 Если по истечении этого времени клиент ничего не примет,
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1863 соединение будет закрыто.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1864 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1865
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1866 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1867
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1868
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1869 <directive name="sendfile">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1870
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1871 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
1872 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1873 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1874 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1875 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1876 <context>if в location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1877
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1878 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1879 Разрешает или запрещает использовать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1880 <c-func>sendfile</c-func>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1881 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1882
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1883 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1884
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1885
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1886 <directive name="sendfile_max_chunk">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1887
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1888 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1889 <default>0</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1890 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1891 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1892 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1893
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1894 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1895 При установке в ненулевое значение ограничивает объём данных,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1896 который может передан за один вызов <c-func>sendfile</c-func>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1897 Без этого ограничения одно быстрое соединение может целиком
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1898 захватить рабочий процесс.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1899 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1900
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1901 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1902
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1903
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1904 <directive name="server">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
1905 <syntax block="yes"/>
99
1d315ef37215 The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents: 79
diff changeset
1906 <default/>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1907 <context>http</context>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1908
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1909 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1910 Задаёт конфигурацию для виртуального сервера.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1911 Чёткого разделения виртуальных серверов на IP-based (на основании IP-адреса)
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1912 и name-based (на основании поля <header>Host</header> заголовка запроса) нет.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1913 Вместо этого директивами <link id="listen"/> описываются все
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1914 адреса и порты, на которых нужно принимать соединения для этого сервера,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1915 а в директиве <link id="server_name"/> указываются все имена серверов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1916 Пример конфигурации описан в документе по
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1917 <link doc="../virtual_hosts.xml">
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1918 настройке виртуальных серверов</link>.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1919 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1920
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1921 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1922
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1923
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1924 <directive name="server_name">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1925 <syntax><argument>имя</argument> ...</syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1926 <default>""</default>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1927 <context>server</context>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1928
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1929 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1930 Задаёт имена виртуального сервера, например:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1931 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1932 server {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1933 server_name example.com www.example.com;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1934 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1935 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1936 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1937
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1938 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1939 Первое имя становится основным именем сервера.
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1940 В именах серверов можно использовать звёздочку (“<code>*</code>”)
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1941 для замены первой или последней части имени:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1942 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1943 server {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1944 server_name example.com *.example.com www.example.*;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1945 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1946 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1947 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1948
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1949 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1950 Два первых вышеприведённых имени можно объединить в одно:
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1951 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1952 server {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1953 server_name .example.com;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1954 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1955 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1956 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1957
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1958 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1959 Если аргумент равен “<var>$hostname</var>” (0.9.4), то
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1960 подставляется имя хоста (hostname) машины.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1961 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1962
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1963 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1964 В качестве имени сервера можно также использовать регулярное выражение,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1965 указав перед ним тильду (“<code>~</code>”):
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1966 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1967 server {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1968 server_name www.example.com ~^www\d+\.example\.com$;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1969 }
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1970 </example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1971 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1972
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1973 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1974 Регулярное выражение может содержать выделения (0.7.40),
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1975 которые могут затем использоваться в других директивах:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1976 <example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1977 server {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1978 server_name ~^(www\.)?(.+)$;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1979
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1980 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1981 root /sites/$2;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1982 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1983 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1984
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1985 server {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1986 server_name _;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1987
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1988 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1989 root /sites/default;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1990 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1991 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1992 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1993 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1994
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1995 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1996 Именованные выделения в регулярном выражении создают переменные (0.8.25),
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
1997 которые могут затем использоваться в других директивах:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1998 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1999 server {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2000 server_name ~^(www\.)?(?&lt;domain&gt;.+)$;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2001
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2002 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2003 root /sites/$domain;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2004 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2005 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2006
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2007 server {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2008 server_name _;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2009
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2010 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2011 root /sites/default;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2012 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2013 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2014 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2015 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2016
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2017 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2018 Возможно также указать пустое имя сервера (0.7.11):
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2019 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2020 server {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2021 server_name www.example.com "";
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2022 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2023 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2024 Это позволяет обрабатывать запросы без поля <header>Host</header> заголовка
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2025 запроса в этом сервере, а не в сервере по умолчанию для данной пары адрес:порт.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2026 Это настройка по умолчанию.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2027 <note>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2028 До 0.8.48 по умолчанию использовалось имя хоста (hostname) машины.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2029 </note>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2030 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2031
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2032 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2033 Порядок проверки имён следующий:
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2034 <list type="enum">
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2035
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2036 <listitem>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2037 полные имена
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2038 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2039
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2040 <listitem>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2041 имена с маской в начале имени, например “<code>*.example.com</code>”
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2042 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2043
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2044 <listitem>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2045 имена с маской в конце имени, например “<code>mail.*</code>”
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2046 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2047
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2048 <listitem>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2049 регулярные выражения
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2050 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2051
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2052 </list>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2053 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2054
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2055 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2056
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2057
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2058 <directive name="server_name_in_redirect">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2059 <syntax><value>on</value> | <value>off</value></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2060 <default>off</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2061 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2062 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2063 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2064
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2065 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2066 Разрешает или запрещает использовать в перенаправлениях, выдаваемых nginx'ом,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2067 основное имя сервера, задаваемое директивой
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2068 <link id="server_name"/>.
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2069 Если запрещено, то используется имя, указанное в поле <header>Host</header>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2070 заголовка запроса.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2071 Если же этого поля нет, то используется IP-адрес сервера.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2072 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2073
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2074 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2075 См. также директиву <link id="port_in_redirect"/>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2076 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2077
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2078 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2079
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2080
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2081 <directive name="server_names_hash_bucket_size">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2082 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2083 <default>32|64|128</default>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2084 <context>http</context>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2085
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2086 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2087 Задаёт размер корзины в хэш-таблицах имён серверов.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2088 Значение по умолчанию зависит от размера строки кэша процессора.
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2089 Подробнее смотрите в документе по
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2090 <link doc="../hash.xml">настройке хэшей</link>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2091 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2092
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2093 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2094
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2095
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2096 <directive name="server_names_hash_max_size">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2097 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2098 <default>512</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2099 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2100
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2101 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2102 Задаёт максимальный <argument>размер</argument> хэш-таблиц имён серверов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2103 Подробнее смотрите в документе по
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2104 <link doc="../hash.xml">настройке хэшей</link>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2105 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2106
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2107 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2108
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2109
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2110 <directive name="server_tokens">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2111 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
2112 <default>on</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2113 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2114 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2115 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2116
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2117 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2118 Разрешает или запрещает выдавать версию nginx'а в сообщениях об ошибках и
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2119 в поле <header>Server</header> заголовка ответа.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2120 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2121
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2122 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2123
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2124
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2125 <directive name="tcp_nodelay">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2126 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
2127 <default>on</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2128 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2129 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2130 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2131
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2132 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2133 Разрешает или запрещает использование опции <c-def>TCP_NODELAY</c-def>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2134 Опция включаются только при переходе соединения в состояние keep-alive.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2135 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2136
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2137 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2138
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2139
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2140 <directive name="tcp_nopush">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2141 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
2142 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2143 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2144 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2145 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2146
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2147 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2148 Разрешает или запрещает использование опции сокета
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2149 <c-def>TCP_NOPUSH</c-def> во FreeBSD или
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2150 <c-def>TCP_CORK</c-def> в Linux.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2151 Опции включаются только при использовании <link id="sendfile"/>.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2152 Включение опции позволяет
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2153 <list type="bullet">
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2154
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2155 <listitem>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2156 передавать заголовок ответа и начало файла в одном пакете
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2157 в Linux и во FreeBSD&nbsp;4.*;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2158 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2159
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2160 <listitem>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2161 передавать файл полными пакетами.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2162 </listitem>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2163
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2164 </list>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2165 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2166
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2167 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2168
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2169
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2170 <directive name="try_files">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2171 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2172 <argument>файл</argument> ...
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2173 <argument>uri</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2174 </syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2175 <syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2176 <argument>файл</argument> ...
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2177 =<argument>код</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2178 </syntax>
99
1d315ef37215 The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents: 79
diff changeset
2179 <default/>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2180 <context>server</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2181 <context>location</context>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2182
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2183 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2184 Проверяет существование файлов в заданном порядке и использует
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2185 для обработки запроса первый найденный файл, причём обработка
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2186 делается в контексте этого же location'а.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2187 Путь к файлу строится из аргумента <argument>файл</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2188 в соответствии с директивами
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2189 <link id="root"/> и <link id="alias"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2190 С помощью слэша в конце имени можно проверить существование каталога,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2191 например, “<code>$uri/</code>”.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2192 В случае, если ни один файл не найден, то делается внутреннее
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2193 перенаправление на <argument>uri</argument>, заданный последним аргументом.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2194 Например:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2195 <example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2196 location /images/ {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2197 try_files $uri /images/default.gif;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2198 }
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2199
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2200 location = /images/default.gif {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2201 expires 30s;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2202 }
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2203 </example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2204 Последний аргумент может также указывать на именованный location,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2205 смотрите примеры ниже.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2206 С версии 0.7.51 последний аргумент может также быть кодом:
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2207 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2208 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2209 try_files $uri $uri/index.html $uri.html =404;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2210 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2211 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2212 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2213
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2214 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2215 Пример использования при проксировании Mongrel:
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2216 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2217 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2218 try_files /system/maintenance.html
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2219 $uri $uri/index.html $uri.html
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2220 @mongrel;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2221 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2222
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2223 location @mongrel {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2224 proxy_pass http://mongrel;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2225 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2226 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2227 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2228
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2229 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2230 Пример использования вместе с Drupal/FastCGI:
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2231 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2232 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2233 try_files $uri $uri/ @drupal;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2234 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2235
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2236 location ~ \.php$ {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2237 try_files $uri @drupal;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2238
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2239 fastcgi_pass ...;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2240
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2241 fastcgi_param SCRIPT_FILENAME /path/to$fastcgi_script_name;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2242 fastcgi_param SCRIPT_NAME $fastcgi_script_name;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2243 fastcgi_param QUERY_STRING $args;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2244
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2245 ... прочие fastcgi_param
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2246 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2247
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2248 location @drupal {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2249 fastcgi_pass ...;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2250
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2251 fastcgi_param SCRIPT_FILENAME /path/to/index.php;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2252 fastcgi_param SCRIPT_NAME /index.php;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2253 fastcgi_param QUERY_STRING q=$uri&amp;$args;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2254
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2255 ... прочие fastcgi_param
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2256 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2257 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2258 В следующем примере директива <code>try_files</code>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2259 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2260 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2261 try_files $uri $uri/ @drupal;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2262 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2263 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2264 аналогична директивам
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2265 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2266 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2267 error_page 404 = @drupal;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2268 log_not_found off;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2269 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2270 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2271 А здесь
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2272 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2273 location ~ \.php$ {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2274 try_files $uri @drupal;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2275
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2276 fastcgi_pass ...;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2277
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2278 fastcgi_param SCRIPT_FILENAME /path/to$fastcgi_script_name;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2279
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2280 ...
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2281 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2282 </example>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2283 <code>try_files</code> проверяет существование PHP-файла,
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2284 прежде чем передать запрос FastCGI-серверу.
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2285 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2286
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2287 <para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2288 Пример использования вместе с Wordpress и Joomla:
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2289 <example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2290 location / {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2291 try_files $uri $uri/ @wordpress;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2292 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2293
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2294 location ~ \.php$ {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2295 try_files $uri @wordpress;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2296
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2297 fastcgi_pass ...;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2298
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2299 fastcgi_param SCRIPT_FILENAME /path/to$fastcgi_script_name;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2300 ... прочие fastcgi_param
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2301 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2302
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2303 location @wordpress {
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2304 fastcgi_pass ...;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2305
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2306 fastcgi_param SCRIPT_FILENAME /path/to/index.php;
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2307 ... прочие fastcgi_param
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2308 }
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2309 </example>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2310 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2311
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2312 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2313
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2314
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2315 <directive name="types">
108
72524ae53106 Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents: 106
diff changeset
2316 <syntax block="yes"/>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
2317 <default>
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
2318 text/html html;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
2319 image/gif gif;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
2320 image/jpeg jpg;
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
2321 </default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2322 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2323 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2324 <context>location</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2325
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2326 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2327 Задаёт соответствие расширений имён файлов и MIME-типов ответов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2328 Расширения нечувствительны к регистру символов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2329 Одному MIME-типу может соответствовать несколько расширений, например:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2330 <example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2331 types {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2332 application/octet-stream bin exe dll;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2333 application/octet-stream deb;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2334 application/octet-stream dmg;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2335 }
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2336 </example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2337 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2338
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2339 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2340 Достаточно полная таблица соответствий входит в дистрибутив nginx
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2341 и находится в файле <path>conf/mime.types</path>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2342 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2343
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2344 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2345 Для того, чтобы для определённого location'а для всех ответов
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2346 выдавался MIME-тип “<code>application/octet-stream</code>”,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2347 можно использовать следующее:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2348 <example>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2349 location /download/ {
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2350 types { }
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2351 default_type application/octet-stream;
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2352 }
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2353 </example>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2354 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2355
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2356 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2357
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2358
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2359 <directive name="types_hash_bucket_size">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2360 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2361 <default>32|64|128</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2362 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2363 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2364 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2365
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2366 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2367 Задаёт размер корзины в хэш-таблицах типов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2368 Значение по умолчанию зависит от размера строки кэша процессора.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2369 Подробнее смотрите в документе по
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2370 <link doc="../hash.xml">настройке хэшей</link>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2371 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2372
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2373 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2374
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2375
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2376 <directive name="types_hash_max_size">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2377 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2378 <default>1024</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2379 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2380 <context>server</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2381 <context>location</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2382
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2383 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2384 Задаёт максимальный <argument>размер</argument> хэш-таблиц типов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2385 Подробнее смотрите в документе по
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2386 <link doc="../hash.xml">настройке хэшей</link>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2387 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2388
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2389 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2390
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2391
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2392 <directive name="underscores_in_headers">
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2393 <syntax><value>on</value> | <value>off</value></syntax>
102
c76a257f3fd4 The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents: 99
diff changeset
2394 <default>off</default>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2395 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2396 <context>server</context>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2397
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2398 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2399 Разрешает или запрещает использование символов подчёркивания в
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2400 полях заголовка запроса клиента.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2401 Если запрещено, поля заголовка запроса, в чьих именах есть подчёркивания,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2402 помечаются как недопустимые и подпадают под действие директивы
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2403 <link id="ignore_invalid_headers"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2404 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2405
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2406 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2407
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2408
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2409 <directive name="variables_hash_bucket_size">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2410 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2411 <default>64</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2412 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2413
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2414 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2415 Задаёт размер корзины в хэш-таблице переменных.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2416 Подробнее смотрите в документе по
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2417 <link doc="../hash.xml">настройке хэшей</link>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2418 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2419
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2420 </directive>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2421
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2422
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2423 <directive name="variables_hash_max_size">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2424 <syntax><argument>размер</argument></syntax>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2425 <default>512</default>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2426 <context>http</context>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2427
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2428 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2429 Задаёт максимальный <argument>размер</argument> хэш-таблицы переменных.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2430 Подробнее смотрите в документе по
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2431 <link doc="../hash.xml">настройке хэшей</link>.
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2432 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2433
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2434 </directive>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2435
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2436 </section>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2437
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2438 <section id="variables" name="Встроенные переменные">
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2439
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2440 <para>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2441 Модуль <code>ngx_http_core_module</code> поддерживает встроенные переменные,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2442 имена которых совпадают с именами переменных веб-сервера Apache.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2443 Прежде всего, это переменные, представляющие из себя поля заголовка
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2444 запроса клиента, такие как <var>$http_user_agent</var>, <var>$http_cookie</var>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2445 и тому подобное.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2446 Кроме того, есть и другие переменные:
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2447 <list type="tag">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2448
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2449 <tag-name><var>$arg_</var><argument>имя</argument></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2450 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2451 аргумент <argument>имя</argument> в строке запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2452 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2453
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2454 <tag-name><var>$args</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2455 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2456 аргументы в строке запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2457 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2458
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2459 <tag-name><var>$binary_remote_addr</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2460 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2461 адрес клиента в бинарном виде, длина значения всегда 4 байта
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2462 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2463
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2464 <tag-name><var>$body_bytes_sent</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2465 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2466 число байт, переданное клиенту, без учёта заголовка ответа
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2467 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2468
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2469 <tag-name><var>$content_length</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2470 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2471 поле <header>Content-Length</header> заголовка запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2472 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2473
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2474 <tag-name><var>$content_type</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2475 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2476 поле <header>Content-Type</header> заголовка запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2477 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2478
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2479 <tag-name><var>$cookie_</var><argument>имя</argument></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2480 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2481 cookie <argument>имя</argument>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2482 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2483
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2484 <tag-name><var>$document_root</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2485 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2486 значение директивы <link id="root"/> для текущего запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2487 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2488
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2489 <tag-name><var>$document_uri</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2490 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2491 то же, что и <var>$uri</var>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2492 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2493
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2494 <tag-name><var>$host</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2495 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2496 поле <header>Host</header> заголовка запроса,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2497 или имя сервера, соответствующего запросу, если этого поля нет
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2498 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2499
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2500 <tag-name><var>$hostname</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2501 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2502 имя хоста
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2503 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2504
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2505 <tag-name><var>$http_</var><argument>имя</argument></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2506 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2507 поле <argument>имя</argument> заголовка запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2508 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2509
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2510 <tag-name><var>$https</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2511 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2512 “<code>on</code>”
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2513 если соединение работает в режиме SSL,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2514 либо пустая строка
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2515 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2516
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2517 <tag-name><var>$is_args</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2518 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2519 “<code>?</code>”, если в строке запроса есть аргументы,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2520 и пустая строка, если их нет
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2521 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2522
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2523 <tag-name><var>$limit_rate</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2524 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2525 позволяет ограничивать скорость соединения
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2526 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2527
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2528 <tag-name><var>$nginx_version</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2529 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2530 версия nginx
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2531 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2532
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2533 <tag-name><var>$pid</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2534 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2535 номер (PID) рабочего процесса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2536 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2537
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2538 <tag-name><var>$query_string</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2539 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2540 то же, что и <var>$args</var>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2541 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2542
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2543 <tag-name><var>$realpath_root</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2544 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2545 значение директивы <link id="root"/> для текущего запроса,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2546 при этом все символические ссылки преобразованы в реальные путь
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2547 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2548
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2549 <tag-name><var>$remote_addr</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2550 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2551 адрес клиента
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2552 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2553
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2554 <tag-name><var>$remote_port</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2555 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2556 порт клиента
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2557 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2558
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2559 <tag-name><var>$remote_user</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2560 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2561 имя пользователя, использованное в Basic аутентификации
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2562 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2563
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2564 <tag-name><var>$request</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2565 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2566 оригинальная строка запроса целиком
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2567 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2568
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2569 <tag-name><var>$request_body</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2570 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2571 тело запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2572 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2573 Значение переменной появляется в location'ах, обрабатываемых
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2574 директивами
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 102
diff changeset
2575 <link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>
253
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2576 и
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2577 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2578 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2579 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2580
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2581 <tag-name><var>$request_body_file</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2582 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2583 имя временного файла, в котором хранится тело запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2584 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2585 По завершению обработки файл необходимо удалить.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2586 Для того, чтобы тело запроса всегда записывалось в файл,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2587 следует указать
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2588 <link id="client_body_in_file_only">client_body_in_file_only on</link>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2589 При передаче имени временного файла в проксированном запросе
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2590 или в запросе к FastCGI-серверу следует запретить передачу самого
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2591 тела директивами
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2592 <link doc="ngx_http_proxy_module.xml" id="proxy_pass_request_body">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2593 proxy_pass_request_body off</link>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2594 или
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2595 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass_request_body">
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2596 fastcgi_pass_request_body off</link>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2597 соответственно.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2598 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2599 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2600
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2601 <tag-name><var>$request_completion</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2602 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2603 “<code>OK</code>” если запрос завершился,
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2604 либо пустая строка
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2605 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2606
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2607 <tag-name><var>$request_filename</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2608 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2609 путь к файлу для текущего запроса, формируемый из директив
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2610 <link id="root"/> или <link id="alias"/> и URI запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2611 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2612
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2613 <tag-name><var>$request_method</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2614 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2615 метод запроса, обычно
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2616 “<code>GET</code>” или “<code>POST</code>”
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2617 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2618
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2619 <tag-name><var>$request_uri</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2620 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2621 оригинальный URI запроса целиком (с аргументами)
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2622 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2623
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2624 <tag-name><var>$scheme</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2625 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2626 схема запроса, “<code>http</code>” или “<code>https</code>”
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2627 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2628
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2629 <tag-name><var>$sent_http_</var><argument>имя</argument></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2630 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2631 поле <argument>имя</argument> заголовка ответа
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2632 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2633
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2634 <tag-name><var>$server_addr</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2635 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2636 адрес сервера, принявшего запрос
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2637 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2638 Получение значения этой переменной обычно требует одного системного вызова.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2639 Чтобы избежать системного вызова, в директивах <link id="listen"/>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2640 следует указывать адреса и использовать параметр <parameter>bind</parameter>.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2641 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2642 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2643
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2644 <tag-name><var>$server_name</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2645 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2646 имя сервера, принявшего запрос
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2647 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2648
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2649 <tag-name><var>$server_port</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2650 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2651 порт сервера, принявшего запрос
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2652 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2653
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2654 <tag-name><var>$server_protocol</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2655 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2656 протокол сервера, обычно
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2657 “<code>HTTP/1.0</code>”
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2658 или
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2659 “<code>HTTP/1.1</code>”
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2660 </tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2661
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2662 <tag-name><var>$uri</var></tag-name>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2663 <tag-desc>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2664 текущий URI запроса
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2665 <para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2666 Он может отличаться от первоначального, например, при внутренних
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2667 перенаправлениях или при использовании индексных файлов.
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2668 </para>
ff1e139a8c98 Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents: 222
diff changeset
2669 </tag-desc>
76
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2670
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2671 </list>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2672 </para>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2673
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2674 </section>
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2675
4a4caa566120 Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2676 </module>