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