Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_core_module.xml @ 1262:dbd80a96189d
Added missing links into the Russian index page.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Fri, 01 Aug 2014 14:26:28 +0400 |
parents | ac7a5ee98768 |
children | 7261e621dd4a |
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" |
1257
ac7a5ee98768
Split long sentence into two.
Ruslan Ermilov <ru@nginx.com>
parents:
1194
diff
changeset
|
13 rev="35"> |
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> вызывается с флагом |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
96 <c-def>SF_NODISKIO</c-def>, в результате чего она не блокируется на диске, а |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
97 сообщает об отсутствии данных в памяти. |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
98 После этого nginx инициирует асинхронную подгрузку данных, читая один байт. |
253
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> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
106 В Linux AIO можно использовать только начиная с версии ядра 2.6.22. |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
107 Кроме того, необходимо также дополнительно включить |
253
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> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
120 В Linux |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
121 <link id="directio"/> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
122 можно использовать только для чтения блоков, выравненных |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
123 на границу 512 байт (или 4К для XFS). |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
124 Невыравненный конец файла будет читаться блокированно. |
253
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> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
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> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
393 Позволяет производить точную настройку выделения памяти |
253
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 Эта директива не оказывает существенного влияния на |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
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-тип ответов по умолчанию. |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
411 Соответствие расширений имён файлов MIME-типу ответов задаётся |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
412 с помощью директивы <link id="types"/>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
413 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
414 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
415 </directive> |
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 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
418 <directive name="directio"> |
271 | 419 <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
|
420 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
421 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
422 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
423 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
424 <appeared-in>0.7.7</appeared-in> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
425 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
426 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
427 Разрешает использовать флаги |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
428 <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
|
429 <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
|
430 или функцию <c-func>directio</c-func> (Solaris) |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
431 при чтении файлов, размер которых больше либо равен указанному. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
432 Директива автоматически запрещает (0.7.15) использование |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
433 <link id="sendfile"/> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
434 для данного запроса. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
435 Рекомендуется использовать для больших файлов: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
436 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
437 directio 4m; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
438 </example> |
106
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
439 или при использовании <link id="aio"/> в Linux. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
440 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
441 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
442 </directive> |
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 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
445 <directive name="directio_alignment"> |
271 | 446 <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
|
447 <default>512</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
448 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
449 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
450 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
451 <appeared-in>0.8.11</appeared-in> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
452 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
453 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
454 Устанавливает выравнивание для |
106
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
455 <link id="directio"/>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
456 В большинстве случаев достаточно 512-байтового выравнивания, однако |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
457 при использовании XFS под Linux его нужно увеличить до 4K. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
458 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
459 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
460 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
461 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
462 |
418
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
463 <directive name="disable_symlinks"> |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
464 <syntax><literal>off</literal></syntax> |
418
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
465 <syntax> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
466 <literal>on</literal> | |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
467 <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
|
468 [<literal>from</literal>=<value>часть</value>]</syntax> |
418
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
469 <default>off</default> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
470 <context>http</context> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
471 <context>server</context> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
472 <context>location</context> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
473 <appeared-in>1.1.15</appeared-in> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
474 |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
475 <para> |
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 при открытии файлов: |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
478 <list type="tag"> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
479 |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
480 <tag-name><literal>off</literal></tag-name> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
481 <tag-desc> |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
482 Символические ссылки в пути допускаются и не проверяются. |
418
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
483 Это стандартное поведение. |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
484 </tag-desc> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
485 |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
486 <tag-name><literal>on</literal></tag-name> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
487 <tag-desc> |
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 доступ к файлу запрещается. |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
490 </tag-desc> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
491 |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
492 <tag-name><literal>if_not_owner</literal></tag-name> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
493 <tag-desc> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
494 Доступ к файлу запрещается, если любой компонент пути |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
495 является символической ссылкой, а ссылка и объект, на |
418
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
496 который она ссылается, имеют разных владельцев. |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
497 </tag-desc> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
498 |
438
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
499 <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
|
500 <tag-desc> |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
501 При проверке символических ссылок |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
502 (параметры <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
|
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 указав дополнительно параметр |
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
506 <literal>from</literal>=<value>часть</value>. |
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 с компонента пути, который следует за заданной начальной частью. |
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
509 Если значение не является начальной частью проверяемого пути, |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
510 путь проверяется целиком, как если бы этот параметр не был указан вовсе. |
438
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 символические ссылки не проверяются. |
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
513 В значении параметра можно использовать переменные. |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
514 </tag-desc> |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
515 |
418
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
516 </list> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
517 </para> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
518 |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
519 <para> |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
520 Пример: |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
521 <example> |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
522 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
|
523 </example> |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
524 </para> |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
525 |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
526 <para> |
418
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
527 Эта директива доступна только на системах, в которых есть |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
528 интерфейсы <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
|
529 К таким системам относятся современные версии FreeBSD, Linux и Solaris. |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
530 </para> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
531 |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
532 <para> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
533 Параметры <literal>on</literal> и <literal>if_not_owner</literal> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
534 требуют дополнительных затрат на обработку. |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
535 <note> |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
536 На системах, не поддерживающих операцию открытия каталогов только для поиска, |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
537 для использования этих параметров требуется, чтобы рабочие процессы |
438
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
538 имели право читать все проверяемые каталоги. |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
539 </note> |
438
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
540 </para> |
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
541 |
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
542 <para> |
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
543 <note> |
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
544 Модули |
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
545 <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
|
546 <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
|
547 и <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
|
548 в настоящий момент игнорируют эту директиву. |
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
549 </note> |
418
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
550 </para> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
551 |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
552 </directive> |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
553 |
2638f67205ee
Documented the disable_symlinks directive.
Ruslan Ermilov <ru@nginx.com>
parents:
406
diff
changeset
|
554 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
555 <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
|
556 <syntax> |
364 | 557 <value>код</value> ... |
558 [<literal>=</literal>[<value>ответ</value>]] | |
559 <value>uri</value></syntax> | |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
79
diff
changeset
|
560 <default/> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
561 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
562 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
563 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
564 <context>if в location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
565 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
566 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
567 Задаёт URI, который будет показываться для указанных ошибок. |
271 | 568 Директивы <literal>error_page</literal> наследуются с предыдущего уровня |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
569 при условии, что на данном уровне не заданы свои директивы |
271 | 570 <literal>error_page</literal>. |
679
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
571 В значении <literal>uri</literal> можно использовать переменные. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
572 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
573 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
574 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
575 Пример: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
576 <example> |
711
1f383a8bccdb
Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
709
diff
changeset
|
577 error_page 404 /404.html; |
1f383a8bccdb
Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
709
diff
changeset
|
578 error_page 500 502 503 504 /50x.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> |
679
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
583 Кроме того, можно поменять код ответа на другой, |
711
1f383a8bccdb
Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
709
diff
changeset
|
584 используя синтаксис вида “<literal>=</literal><value>ответ</value>”, например: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
585 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
586 error_page 404 =200 /empty.gif; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
587 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
588 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
589 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
590 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
591 Если ошибочный ответ обрабатывается проксированным сервером или |
1194 | 592 FastCGI/uwsgi/SCGI-сервером, и этот сервер может вернуть разные коды ответов, |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
593 например, 200, 302, 401 или 404, то можно выдавать возвращаемый им код: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
594 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
595 error_page 404 = /404.php; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
596 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
597 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
598 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
599 <para> |
679
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
600 Также существует возможность использовать перенаправления для обработки |
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
601 ошибок: |
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
602 <example> |
711
1f383a8bccdb
Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
709
diff
changeset
|
603 error_page 403 http://example.com/forbidden.html; |
1f383a8bccdb
Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
709
diff
changeset
|
604 error_page 404 =301 http://example.com/notfound.html; |
679
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
605 </example> |
871
96839d165b8a
Clarify the description of error_page example.
Sergey Kandaurov <pluknet@nginx.com>
parents:
869
diff
changeset
|
606 В этом случае по умолчанию клиенту возвращается код ответа 302. |
948 | 607 Его можно изменить только на один из кодов ответа, относящихся к |
711
1f383a8bccdb
Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
709
diff
changeset
|
608 перенаправлениям (301, 302, 303 и 307). |
679
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
609 </para> |
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
610 |
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
611 <para> |
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
612 Если при внутреннем перенаправлении не нужно менять URI, то можно передать |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
613 обработку ошибки в именованный location: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
614 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
615 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
616 error_page 404 = @fallback; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
617 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
618 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
619 location @fallback { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
620 proxy_pass http://backend; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
621 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
622 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
623 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
624 |
679
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
625 <para> |
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
626 <note> |
711
1f383a8bccdb
Minor improvements over the recent additions to the "error_page" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
709
diff
changeset
|
627 Если при обработке <literal>uri</literal> происходит ошибка, |
948 | 628 клиенту возвращается ответ с кодом последней случившейся ошибки. |
679
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
629 </note> |
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
630 </para> |
9888364847b7
Documented status codes in the error_page directive.
Vladimir Homutov <vl@nginx.com>
parents:
674
diff
changeset
|
631 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
632 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
633 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
634 |
576
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
635 <directive name="etag"> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
636 <syntax><literal>on</literal> | <literal>off</literal></syntax> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
637 <default>on</default> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
638 <context>http</context> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
639 <context>server</context> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
640 <context>location</context> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
641 <appeared-in>1.3.3</appeared-in> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
642 |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
643 <para> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
644 Разрешает или запрещает автоматическую генерацию поля <header>ETag</header> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
645 заголовка ответа для статических ресурсов. |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
646 </para> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
647 |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
648 </directive> |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
649 |
cac22cc79afd
Documented the "etag" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
566
diff
changeset
|
650 |
651
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
651 <directive name="http"> |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
652 <syntax block="yes"/> |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
653 <default/> |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
654 <context>main</context> |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
655 |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
656 <para> |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
657 Предоставляет контекст конфигурационного файла, в котором указываются |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
658 директивы HTTP-сервера. |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
659 </para> |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
660 |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
661 </directive> |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
662 |
eba81bfb6aaf
Documented the "http" directive.
Vladimir Homutov <vl@nginx.com>
parents:
646
diff
changeset
|
663 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
664 <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
|
665 <syntax> |
364 | 666 <literal>off</literal> | |
667 <literal>exact</literal> | | |
668 <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
|
669 <default>exact</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
670 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
671 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
672 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
673 <appeared-in>0.7.24</appeared-in> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
674 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
675 <para> |
253
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 временем в поле |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
678 <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
|
679 заголовка запроса: |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
680 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
681 <list type="tag"> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
682 |
271 | 683 <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
|
684 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
685 не проверять поле |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
686 <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
|
687 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
688 |
271 | 689 <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
|
690 <tag-desc> |
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 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
693 |
271 | 694 <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
|
695 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
696 время модификации ответа меньше или равно времени, заданному в поле |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
697 <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
|
698 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
699 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
700 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
701 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
702 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
703 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
704 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
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 name="ignore_invalid_headers"> |
271 | 707 <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
|
708 <default>on</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
709 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
710 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
711 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
712 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
713 Если включено, nginx игнорирует поля заголовка с недопустимыми именами. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
714 Допустимыми считаются имена, состоящие из английских букв, цифр, дефисов |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
715 и возможно знаков подчёркивания (последнее контролируется директивой |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
716 <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
|
717 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
718 |
426
1d6dc85ed324
Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents:
419
diff
changeset
|
719 <para> |
1023
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
720 Если директива указана на уровне <link id="server"/>, |
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
721 её значение используется только в том случае, |
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
722 если сервер является сервером по умолчанию. |
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
723 Указанное значение распространяется на все виртуальные серверы, |
426
1d6dc85ed324
Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents:
419
diff
changeset
|
724 слушающие на том же адресе и порту. |
1d6dc85ed324
Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents:
419
diff
changeset
|
725 </para> |
1d6dc85ed324
Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents:
419
diff
changeset
|
726 |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
727 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
728 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
729 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
730 <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
|
731 <syntax/> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
79
diff
changeset
|
732 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
733 <context>location</context> |
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 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
736 Указывает, что location может использоваться только для внутренних запросов. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
737 Для внешних запросов клиенту будет возвращаться ошибка |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
738 <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
|
739 Внутренними запросами являются: |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
740 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
741 <list type="bullet"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
742 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
743 <listitem> |
429
2b9507b2cdf3
List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents:
426
diff
changeset
|
744 запросы, перенаправленные директивами |
2b9507b2cdf3
List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents:
426
diff
changeset
|
745 <link id="error_page"/>, |
2b9507b2cdf3
List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents:
426
diff
changeset
|
746 <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
|
747 <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
|
748 <link id="try_files"/>; |
2b9507b2cdf3
List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents:
426
diff
changeset
|
749 </listitem> |
2b9507b2cdf3
List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents:
426
diff
changeset
|
750 |
2b9507b2cdf3
List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents:
426
diff
changeset
|
751 <listitem> |
2b9507b2cdf3
List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents:
426
diff
changeset
|
752 запросы, перенаправленные с помощью поля |
2b9507b2cdf3
List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents:
426
diff
changeset
|
753 <header>X-Accel-Redirect</header> заголовка ответа вышестоящего сервера; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
754 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
755 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
756 <listitem> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
757 подзапросы, формируемые командой |
271 | 758 “<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
|
759 модуля |
438
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
760 <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
|
761 и директивами модуля |
b27974b92a58
- corrected the description of the from= parameter of the
Ruslan Ermilov <ru@nginx.com>
parents:
436
diff
changeset
|
762 <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
|
763 </listitem> |
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 <listitem> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
766 запросы, изменённые директивой |
429
2b9507b2cdf3
List all sources of internal requests.
Ruslan Ermilov <ru@nginx.com>
parents:
426
diff
changeset
|
767 <link doc="ngx_http_rewrite_module.xml" id="rewrite"/>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
768 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
769 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
770 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
771 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
772 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
773 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
774 Пример: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
775 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
776 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
|
777 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
778 location /404.html { |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
779 internal; |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
780 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
781 </example> |
674
c48c0936b4df
Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
782 <note> |
c48c0936b4df
Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
783 Для предотвращения зацикливания, которое может возникнуть при |
c48c0936b4df
Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
784 использовании некорректных конфигураций, количество внутренних |
c48c0936b4df
Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
785 перенаправлений ограничено десятью. |
c48c0936b4df
Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
786 По достижении этого ограничения будет возвращена ошибка |
c48c0936b4df
Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
787 <http-status code="500" text="Internal Server Error"/>. |
c48c0936b4df
Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
788 В таком случае в лог-файле ошибок можно увидеть сообщение |
c48c0936b4df
Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
789 “rewrite or internal redirection cycle”. |
c48c0936b4df
Documented internal redirections limit.
Vladimir Homutov <vl@nginx.com>
parents:
659
diff
changeset
|
790 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
791 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
792 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
793 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
794 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
795 |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
796 <directive name="keepalive_disable"> |
271 | 797 <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
|
798 <default>msie6</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
799 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
800 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
801 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
802 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
803 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
804 Запрещает keep-alive соединения с некорректно ведущими себя браузерами. |
271 | 805 Параметры <value>браузер</value> указывают, на какие браузеры это |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
806 распространяется. |
271 | 807 Значение <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
|
808 со старыми версиями MSIE после получения запроса POST. |
271 | 809 Значение <literal>safari</literal> запрещает keep-alive соединения |
467
c505c92c8658
Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
454
diff
changeset
|
810 с Safari и подобными им браузерами на Mac OS X и подобных ей ОС. |
271 | 811 Значение <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
|
812 со всеми браузерами. |
467
c505c92c8658
Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
454
diff
changeset
|
813 <note> |
c505c92c8658
Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
454
diff
changeset
|
814 До версии 1.1.18 под значение <literal>safari</literal> подпадали |
549 | 815 все Safari и подобные им браузеры на всех ОС, и keep-alive |
467
c505c92c8658
Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
454
diff
changeset
|
816 соединения с ними были по умолчанию запрещены. |
c505c92c8658
Documented recent changes to the "keepalive_disable" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
454
diff
changeset
|
817 </note> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
818 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
819 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
820 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
821 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
822 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
823 <directive name="keepalive_requests"> |
271 | 824 <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
|
825 <default>100</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
826 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
827 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
828 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
829 <appeared-in>0.8.0</appeared-in> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
830 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
831 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
832 Задаёт максимальное число запросов, которые можно |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
833 сделать по одному keep-alive соединению. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
834 После того, как сделано максимальное число запросов, |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
835 соединение закрывается. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
836 </para> |
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 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
839 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
840 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
841 <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
|
842 <syntax> |
364 | 843 <value>таймаут</value> |
844 [<value>заголовок_таймаута</value>]</syntax> | |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
845 <default>75s</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
846 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
847 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
848 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
849 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
850 <para> |
271 | 851 Первый параметр задаёт таймаут, в течение которого keep-alive |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
852 соединение с клиентом не будет закрыто со стороны сервера. |
835
e0263d44a59b
Http core: documented "keepalive_timeout 0".
Ruslan Ermilov <ru@nginx.com>
parents:
826
diff
changeset
|
853 Значение 0 запрещает keep-alive соединения с клиентами. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
854 Второй необязательный параметр задаёт значение в поле |
271 | 855 <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
|
856 заголовка ответа. |
271 | 857 Два параметра могут отличаться друг от друга. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
858 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
859 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
860 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
861 Поле |
271 | 862 <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
|
863 заголовка понимают Mozilla и Konqueror. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
864 MSIE сам закрывает keep-alive соединение примерно через 60 секунд. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
865 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
866 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
867 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
868 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
869 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
870 <directive name="large_client_header_buffers"> |
271 | 871 <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
|
872 <default>4 8k</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
873 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
874 <context>server</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
875 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
876 <para> |
271 | 877 Задаёт максимальное <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
|
878 буферов для чтения большого заголовка запроса клиента. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
879 Строка запроса не должна превышать размера одного буфера, иначе клиенту |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
880 возвращается ошибка |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
881 <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
|
882 Поле заголовка запроса также не должно превышать размера одного буфера, |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
883 иначе клиенту возвращается ошибка |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
884 <http-status code="400" text="Bad Request"/>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
885 Буферы выделяются только по мере необходимости. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
886 По умолчанию размер одного буфера равен 8K байт. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
887 Если по окончании обработки запроса соединение переходит в состояние |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
888 keep-alive, эти буферы освобождаются. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
889 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
890 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
891 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
892 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
893 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
894 <directive name="limit_except"> |
271 | 895 <syntax block="yes"><value>метод</value> ...</syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
79
diff
changeset
|
896 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
897 <context>location</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
898 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
899 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
900 Ограничивает HTTP-методы, доступные внутри location. |
271 | 901 Параметр <value>метод</value> может быть одним из |
902 <literal>GET</literal>, | |
903 <literal>HEAD</literal>, | |
904 <literal>POST</literal>, | |
905 <literal>PUT</literal>, | |
906 <literal>DELETE</literal>, | |
907 <literal>MKCOL</literal>, | |
908 <literal>COPY</literal>, | |
909 <literal>MOVE</literal>, | |
910 <literal>OPTIONS</literal>, | |
911 <literal>PROPFIND</literal>, | |
912 <literal>PROPPATCH</literal>, | |
913 <literal>LOCK</literal>, | |
914 <literal>UNLOCK</literal> | |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
915 или |
271 | 916 <literal>PATCH</literal>. |
917 Если разрешён метод <literal>GET</literal>, то метод | |
918 <literal>HEAD</literal> также будет разрешён. | |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
919 Доступ к остальным методам может быть ограничен при помощи директив модулей |
79
0a45870d0160
Fixed cross-document links to use doc and id.
Maxim Dounin <mdounin@mdounin.ru>
parents:
76
diff
changeset
|
920 <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
|
921 и |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
922 <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
|
923 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
924 limit_except GET { |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
925 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
|
926 deny all; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
927 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
928 </example> |
253
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 <emphasis>кроме</emphasis> GET и HEAD. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
931 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
932 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
933 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
934 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
935 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
936 <directive name="limit_rate"> |
271 | 937 <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
|
938 <default>0</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
939 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
940 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
941 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
942 <context>if в location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
943 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
944 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
945 Ограничивает скорость передачи ответа клиенту. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
946 Скорость задаётся в байтах в секунду. |
767
1bb8b733416a
Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents:
741
diff
changeset
|
947 Значение 0 отключает ограничение скорости. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
948 <!-- |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
949 Чем меньше скорость, тем более аккуратным будет ограничение. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
950 --> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
951 Ограничение устанавливается на запрос, поэтому, если клиент одновременно |
767
1bb8b733416a
Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents:
741
diff
changeset
|
952 откроет два соединения, суммарная скорость будет вдвое выше |
1bb8b733416a
Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents:
741
diff
changeset
|
953 заданного ограничения. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
954 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
955 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
956 <para> |
767
1bb8b733416a
Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents:
741
diff
changeset
|
957 Ограничение скорости можно также задать в переменной <var>$limit_rate</var>. |
1bb8b733416a
Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents:
741
diff
changeset
|
958 Это может быть полезно в случаях, когда скорость нужно ограничивать |
1bb8b733416a
Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents:
741
diff
changeset
|
959 в зависимости от какого-либо условия: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
960 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
961 server { |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
962 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
963 if ($slow) { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
964 set $limit_rate 4k; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
965 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
966 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
967 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
968 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
969 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
970 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
971 |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
503
diff
changeset
|
972 <para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
503
diff
changeset
|
973 Кроме того, ограничение скорости может быть задано в поле |
767
1bb8b733416a
Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents:
741
diff
changeset
|
974 <header>X-Accel-Limit-Rate</header> заголовка ответа проксированного сервера. |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
503
diff
changeset
|
975 Эту возможность можно запретить с помощью директив |
1181 | 976 <link doc="ngx_http_proxy_module.xml" id="proxy_ignore_headers"/>, |
1194 | 977 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_ignore_headers"/>, |
978 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_ignore_headers"/> | |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
503
diff
changeset
|
979 и |
1181 | 980 <link doc="ngx_http_scgi_module.xml" id="scgi_ignore_headers"/>. |
506
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
503
diff
changeset
|
981 </para> |
657848837328
Documented how nginx processes proxied server's response header fields
Ruslan Ermilov <ru@nginx.com>
parents:
503
diff
changeset
|
982 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
983 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
984 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
985 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
986 <directive name="limit_rate_after"> |
271 | 987 <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
|
988 <default>0</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 <context>if в location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
993 <appeared-in>0.8.0</appeared-in> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
994 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
995 <para> |
253
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 ограничиваться скорость передачи ответа клиенту. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
998 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
999 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1000 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1001 Пример: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1002 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1003 location /flv/ { |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1004 flv; |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1005 limit_rate_after 500k; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1006 limit_rate 50k; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1007 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1008 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1009 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1010 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1011 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1012 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1013 |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1014 <directive name="lingering_close"> |
271 | 1015 <syntax> |
364 | 1016 <literal>off</literal> | |
1017 <literal>on</literal> | | |
1018 <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
|
1019 <default>on</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1020 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1021 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1022 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1023 <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
|
1024 <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
|
1025 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1026 <para> |
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 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1030 <para> |
271 | 1031 Со значением по умолчанию “<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
|
1032 <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
|
1033 <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
|
1034 поступающие от клиента, перед полным закрытием соединения, но только |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1035 если эвристика указывает на то, что клиент может ещё послать данные. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1036 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1037 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1038 <para> |
271 | 1039 Со значением “<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
|
1040 ждать и обрабатывать дополнительные данные, поступающие от клиента. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1041 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1042 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1043 <para> |
271 | 1044 Со значением “<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
|
1045 дополнительных данных и сразу же закроет соединение. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1046 Это поведение нарушает протокол и поэтому не должно использоваться без |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1047 необходимости. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1048 </para> |
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 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1051 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1052 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1053 <directive name="lingering_time"> |
271 | 1054 <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
|
1055 <default>30s</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1056 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1057 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1058 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1059 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1060 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1061 Если действует <link id="lingering_close"/>, |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1062 эта директива задаёт максимальное время, в течение которого nginx |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1063 будет обрабатывать (читать и игнорировать) дополнительные данные, |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1064 поступающие от клиента. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1065 По прошествии этого времени соединение будет закрыто, даже если |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1066 будут ещё данные. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1067 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1068 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1069 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1070 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1071 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1072 <directive name="lingering_timeout"> |
271 | 1073 <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
|
1074 <default>5s</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1075 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1076 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1077 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1078 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1079 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1080 Если действует <link id="lingering_close"/>, эта директива задаёт |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1081 максимальное время ожидания поступления дополнительных данных от клиента. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1082 Если в течение этого времени данные не были получены, соединение закрывается. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1083 В противном случае данные читаются и игнорируются, и nginx снова |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1084 ждёт поступления данных. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1085 Цикл “ждать-читать-игнорировать” повторяется, но не дольше чем задано |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1086 директивой <link id="lingering_time"/>. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1087 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1088 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1089 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1090 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1091 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1092 <directive name="listen"> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1093 <syntax> |
364 | 1094 <value>адрес</value>[:<value>порт</value>] |
1095 [<literal>default_server</literal>] | |
869 | 1096 [<literal>ssl</literal>] |
1097 [<literal>spdy</literal>] | |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1098 [<literal>proxy_protocol</literal>] |
364 | 1099 [<literal>setfib</literal>=<value>число</value>] |
1036
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1100 [<literal>fastopen</literal>=<value>число</value>] |
364 | 1101 [<literal>backlog</literal>=<value>число</value>] |
1102 [<literal>rcvbuf</literal>=<value>размер</value>] | |
1103 [<literal>sndbuf</literal>=<value>размер</value>] | |
1104 [<literal>accept_filter</literal>=<value>фильтр</value>] | |
1105 [<literal>deferred</literal>] | |
1106 [<literal>bind</literal>] | |
1107 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] | |
1108 [<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
|
1109 <syntax> |
364 | 1110 <value>порт</value> |
1111 [<literal>default_server</literal>] | |
869 | 1112 [<literal>ssl</literal>] |
1113 [<literal>spdy</literal>] | |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1114 [<literal>proxy_protocol</literal>] |
364 | 1115 [<literal>setfib</literal>=<value>число</value>] |
1036
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1116 [<literal>fastopen</literal>=<value>число</value>] |
364 | 1117 [<literal>backlog</literal>=<value>число</value>] |
1118 [<literal>rcvbuf</literal>=<value>размер</value>] | |
1119 [<literal>sndbuf</literal>=<value>размер</value>] | |
1120 [<literal>accept_filter</literal>=<value>фильтр</value>] | |
1121 [<literal>deferred</literal>] | |
1122 [<literal>bind</literal>] | |
1123 [<literal>ipv6only</literal>=<literal>on</literal>|<literal>off</literal>] | |
1124 [<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
|
1125 <syntax> |
364 | 1126 <literal>unix:</literal><value>путь</value> |
1127 [<literal>default_server</literal>] | |
869 | 1128 [<literal>ssl</literal>] |
1129 [<literal>spdy</literal>] | |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1130 [<literal>proxy_protocol</literal>] |
364 | 1131 [<literal>backlog</literal>=<value>число</value>] |
1132 [<literal>rcvbuf</literal>=<value>размер</value>] | |
1133 [<literal>sndbuf</literal>=<value>размер</value>] | |
1134 [<literal>accept_filter</literal>=<value>фильтр</value>] | |
1135 [<literal>deferred</literal>] | |
1136 [<literal>bind</literal>] | |
1137 [<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
|
1138 <default>*:80 | *:8000</default> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1139 <context>server</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1140 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1141 <para> |
271 | 1142 Задаёт <value>адрес</value> и <value>порт</value> для IP |
1143 или <value>путь</value> для UNIX-сокета, | |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1144 на которых сервер будет принимать запросы. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1145 Можно указать <value>адрес</value> и <value>порт</value>, |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1146 либо только <value>адрес</value> или только <value>порт</value>. |
271 | 1147 Кроме того, <value>адрес</value> может быть именем хоста, например: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1148 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1149 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
|
1150 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
|
1151 listen 8000; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1152 listen *:8000; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1153 listen localhost:8000; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1154 </example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1155 IPv6-адреса (0.7.36) задаются в квадратных скобках: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1156 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1157 listen [::]:8000; |
941
7d1d53d4d293
Removed link-scoped IPv6 addresses from examples.
Ruslan Ermilov <ru@nginx.com>
parents:
940
diff
changeset
|
1158 listen [::1]; |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1159 </example> |
271 | 1160 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
|
1161 <example> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1162 listen unix:/var/run/nginx.sock; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1163 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1164 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1165 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1166 <para> |
271 | 1167 Если указан только <value>адрес</value>, то используется порт 80. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1168 </para> |
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 <para> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1171 Если директива не указана, то используется либо <literal>*:80</literal>, |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1172 если nginx работает с привилегиями суперпользователя, |
271 | 1173 либо <literal>*:8000</literal>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1174 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1175 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1176 <para> |
271 | 1177 Если у директивы есть параметр <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
|
1178 в котором описана эта директива, будет сервером по умолчанию для указанной пары |
271 | 1179 <value>адрес</value>:<value>порт</value>. |
1180 Если же директив с параметром <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
|
1181 сервером по умолчанию будет первый сервер, в котором описана пара |
271 | 1182 <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
|
1183 <note> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1184 До версии 0.8.21 этот параметр назывался просто |
271 | 1185 <literal>default</literal>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1186 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1187 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1188 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1189 <para> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1190 Параметр <literal>ssl</literal> (0.7.14) указывает на то, что все соединения, |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1191 принимаемые на данном порту, должны работать в режиме SSL. |
869 | 1192 Это позволяет задать компактную <link doc="configuring_https_servers.xml" |
1193 id="single_http_https_server">конфигурацию</link> для сервера, | |
1194 работающего сразу в двух режимах — HTTP и HTTPS. | |
1195 </para> | |
1196 | |
1197 <para> | |
1198 Параметр <literal>spdy</literal> (1.3.15) позволяет принимать на этом порту | |
1199 <link doc="ngx_http_spdy_module.xml">SPDY</link>-соединения. | |
1200 Обычно, чтобы это работало, следует также указать параметр | |
1201 <literal>ssl</literal>, однако nginx можно также настроить и на приём | |
1202 SPDY-соединений без SSL. | |
1203 </para> | |
1204 | |
1205 <para> | |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1206 Параметр <literal>proxy_protocol</literal> (1.5.12) |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1207 указывает на то, что все соединения, принимаемые на данном порту, |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1208 должны использовать |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1209 <link url="http://haproxy.1wt.eu/download/1.5/doc/proxy-protocol.txt">протокол |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1210 PROXY</link>. |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1211 </para> |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1212 |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
1213 <para> |
271 | 1214 В директиве <literal>listen</literal> можно также указать несколько |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1215 дополнительных параметров, специфичных для связанных с сокетами |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1216 системных вызовов. |
271 | 1217 Эти параметры можно задать в любой директиве <literal>listen</literal>, |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1218 но только один раз для указанной пары |
271 | 1219 <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
|
1220 <note> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1221 До версии 0.8.21 их можно было указывать лишь в директиве |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1222 <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
|
1223 </note> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1224 <list type="tag"> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1225 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1226 <tag-name> |
271 | 1227 <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
|
1228 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1229 <tag-desc> |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1230 этот параметр (0.8.44) задаёт таблицу маршрутизации, FIB |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1231 (параметр <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
|
1232 В настоящий момент это работает только на FreeBSD. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1233 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1234 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1235 <tag-name> |
1036
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1236 <literal>fastopen</literal>=<value>число</value> |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1237 </tag-name> |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1238 <tag-desc> |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1239 включает |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1240 “<link url="http://en.wikipedia.org/wiki/TCP_Fast_Open">TCP Fast Open</link>” |
1037 | 1241 для слушающего сокета (1.5.8) и |
1036
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1242 <link url="http://tools.ietf.org/html/draft-ietf-tcpm-fastopen#section-5.1">ограничивает</link> |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1243 максимальную длину очереди соединений, которые ещё не завершили процесс |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1244 three-way handshake. |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1245 <note> |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1246 Не включайте “TCP Fast Open”, не убедившись, что сервер может адекватно |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1247 обрабатывать многократное получение |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1248 <link url="http://tools.ietf.org/html/draft-ietf-tcpm-fastopen#section-6.1"> |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1249 одного и того же SYN-пакета с данными</link>. |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1250 </note> |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1251 </tag-desc> |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1252 |
5894aa46ffef
Documented "listen fastopen=" parameter.
Vladimir Homutov <vl@nginx.com>
parents:
1035
diff
changeset
|
1253 <tag-name> |
271 | 1254 <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
|
1255 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1256 <tag-desc> |
271 | 1257 задаёт параметр <literal>backlog</literal> в вызове |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1258 <c-func>listen</c-func>, который ограничивает |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1259 максимальный размер очереди ожидающих приёма соединений. |
741
082a725038db
Fixed default backlog value description for Mac OS X
Sergey Budnevitch <sb@waeme.net>
parents:
738
diff
changeset
|
1260 По умолчанию <literal>backlog</literal> устанавливается равным -1 для |
082a725038db
Fixed default backlog value description for Mac OS X
Sergey Budnevitch <sb@waeme.net>
parents:
738
diff
changeset
|
1261 FreeBSD и Mac OS X, и 511 для других платформ. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1262 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1263 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1264 <tag-name> |
271 | 1265 <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
|
1266 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1267 <tag-desc> |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1268 задаёт размер буфера приёма |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1269 (параметр <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
|
1270 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1271 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1272 <tag-name> |
271 | 1273 <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
|
1274 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1275 <tag-desc> |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1276 задаёт размер буфера передачи |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1277 (параметр <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
|
1278 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1279 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1280 <tag-name> |
271 | 1281 <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
|
1282 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1283 <tag-desc> |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1284 задаёт название accept-фильтра |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1285 (параметр <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
|
1286 который включается для фильтрации входящих соединений |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1287 перед передачей их в <c-func>accept</c-func>. |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1288 Работает только на FreeBSD и NetBSD 5.0+. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1289 Можно использовать два фильтра: |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1290 <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
|
1291 и |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1292 <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
|
1293 </tag-desc> |
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 <tag-name> |
271 | 1296 <literal>deferred</literal> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1297 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1298 <tag-desc> |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1299 указывает использовать отложенный <c-func>accept</c-func> |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1300 (параметр <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
|
1301 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1302 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1303 <tag-name> |
271 | 1304 <literal>bind</literal> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1305 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1306 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1307 указывает, что для данной пары |
271 | 1308 <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
|
1309 <c-func>bind</c-func> отдельно. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1310 Это нужно потому, что если описаны несколько директив <literal>listen</literal> |
629 | 1311 с одинаковым портом, но разными адресами, и одна из директив |
271 | 1312 <literal>listen</literal> слушает на всех адресах для данного порта |
629 | 1313 (<literal>*:</literal><value>порт</value>), то nginx сделает |
271 | 1314 <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
|
1315 Необходимо заметить, что в этом случае для определения адреса, на которой |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1316 пришло соединение, делается системный вызов <c-func>getsockname</c-func>. |
1035
e9c485d6cc0c
Documented that "listen setfib=" implies "bind".
Ruslan Ermilov <ru@nginx.com>
parents:
1031
diff
changeset
|
1317 Если же используются параметры <literal>setfib</literal>, |
e9c485d6cc0c
Documented that "listen setfib=" implies "bind".
Ruslan Ermilov <ru@nginx.com>
parents:
1031
diff
changeset
|
1318 <literal>backlog</literal>, <literal>rcvbuf</literal>, |
e9c485d6cc0c
Documented that "listen setfib=" implies "bind".
Ruslan Ermilov <ru@nginx.com>
parents:
1031
diff
changeset
|
1319 <literal>sndbuf</literal>, <literal>accept_filter</literal>, |
e9c485d6cc0c
Documented that "listen setfib=" implies "bind".
Ruslan Ermilov <ru@nginx.com>
parents:
1031
diff
changeset
|
1320 <literal>deferred</literal> или <literal>so_keepalive</literal>, |
e9c485d6cc0c
Documented that "listen setfib=" implies "bind".
Ruslan Ermilov <ru@nginx.com>
parents:
1031
diff
changeset
|
1321 то для данной пары |
271 | 1322 <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
|
1323 отдельный вызов <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
|
1324 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1325 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1326 <tag-name> |
271 | 1327 <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
|
1328 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1329 <tag-desc> |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1330 этот параметр (0.7.42) определяет |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1331 (через параметр сокета <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
|
1332 будет ли слушающий на wildcard-адресе <literal>[::]</literal> IPv6-сокет |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1333 принимать только IPv6-соединения, или же одновременно IPv6- и IPv4-соединения. |
615
f3ef5b77d22a
Documented that "ipv6only" is now turned on by default for
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
1334 По умолчанию параметр включён. |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1335 Установить его можно только один раз на старте. |
615
f3ef5b77d22a
Documented that "ipv6only" is now turned on by default for
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
1336 <note> |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1337 До версии 1.3.4, |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1338 если этот параметр не был задан явно, то для сокета действовали |
615
f3ef5b77d22a
Documented that "ipv6only" is now turned on by default for
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
1339 настройки операционной системы. |
f3ef5b77d22a
Documented that "ipv6only" is now turned on by default for
Ruslan Ermilov <ru@nginx.com>
parents:
589
diff
changeset
|
1340 </note> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1341 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1342 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1343 <tag-name> |
271 | 1344 <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
|
1345 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1346 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1347 этот параметр (1.1.11) конфигурирует для слушающего сокета |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1348 поведение “TCP keepalive”. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1349 Если этот параметр опущен, то для сокета будут действовать |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1350 настройки операционной системы. |
271 | 1351 Если он установлен в значение “<literal>on</literal>”, то для сокета |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1352 включается параметр <c-def>SO_KEEPALIVE</c-def>. |
271 | 1353 Если он установлен в значение “<literal>off</literal>”, то для сокета |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1354 параметр <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
|
1355 Некоторые операционные системы поддерживают настройку параметров |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1356 “TCP keepalive” на уровне сокета посредством параметров |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1357 <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
|
1358 <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
|
1359 На таких системах (в настоящий момент это 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
|
1360 FreeBSD 9.0-STABLE) |
271 | 1361 их можно сконфигурировать с помощью параметров <value>keepidle</value>, |
1362 <value>keepintvl</value> и <value>keepcnt</value>. | |
1363 Один или два параметра могут быть опущены, в таком случае для | |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1364 соответствующего параметра сокета будут действовать стандартные |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1365 системные настройки. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1366 Например, |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1367 <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
|
1368 установит таймаут бездействия (<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
|
1369 для интервала проб (<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
|
1370 стандартная системная настройка, а счётчик проб (<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
|
1371 будет равен 10. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1372 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1373 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1374 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1375 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1376 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1377 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1378 Пример: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1379 <example> |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
1380 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
|
1381 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1382 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1383 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1384 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1385 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1386 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1387 <directive name="location"> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1388 <syntax block="yes">[ |
364 | 1389 <literal>=</literal> | |
1390 <literal>~</literal> | | |
1391 <literal>~*</literal> | | |
1392 <literal>^~</literal> | |
1393 ] <value>uri</value></syntax> | |
271 | 1394 <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
|
1395 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1396 <context>server</context> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1397 <context>location</context> |
76
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 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1400 Устанавливает конфигурацию в зависимости от URI запроса. |
503
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1401 </para> |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1402 |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1403 <para> |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1404 Для сопоставления используется URI запроса в нормализованном виде, |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1405 после декодирования текста, заданного в виде “<literal>%XX</literal>”, |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1406 преобразования относительных элементов пути “<literal>.</literal>” и |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1407 “<literal>..</literal>” в реальные и возможной |
503
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1408 <link id="merge_slashes">замены</link> двух и более подряд идущих |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1409 слэшей на один. |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1410 </para> |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1411 |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1412 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1413 location можно задать префиксной строкой или регулярным выражением. |
810
7c72c3e67e77
The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents:
779
diff
changeset
|
1414 Регулярные выражения задаются либо с модификатором “<literal>~*</literal>” |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1415 (для поиска совпадения без учёта регистра символов), |
810
7c72c3e67e77
The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents:
779
diff
changeset
|
1416 либо с модификатором “<literal>~</literal>” (с учётом регистра). |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1417 Чтобы найти location, соответствующий запросу, вначале проверяются |
625
af3f38e349eb
Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents:
617
diff
changeset
|
1418 location’ы, заданные префиксными строками (префиксные location’ы). |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1419 Среди них ищется location с совпадающим префиксом |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1420 максимальной длины и запоминается. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1421 Затем проверяются регулярные выражения, в порядке их следования |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1422 в конфигурационном файле. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1423 Проверка регулярных выражений прекращается после первого же совпадения, |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1424 и используется соответствующая конфигурация. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1425 Если совпадение с регулярным выражением не найдено, то используется |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1426 конфигурация запомненного ранее префиксного location’а. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1427 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1428 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1429 <para> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1430 Блоки <literal>location</literal> могут быть вложенными, |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1431 с некоторыми исключениями, о которых говорится ниже. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1432 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1433 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1434 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1435 Для операционных систем, нечувствительных к регистру символов, таких |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1436 как Mac OS X и Cygwin, сравнение с префиксными строками производится |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1437 без учёта регистра (0.7.7). |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1438 Однако сравнение ограничено только однобайтными locale’ями. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1439 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1440 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1441 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1442 Регулярные выражения могут содержать выделения (0.7.40), которые могут |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1443 затем использоваться в других директивах. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1444 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1445 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1446 <para> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1447 Если у совпавшего префиксного location’а максимальной длины указан модификатор |
271 | 1448 “<literal>^~</literal>”, то регулярные выражения не проверяются. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1449 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1450 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1451 <para> |
810
7c72c3e67e77
The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents:
779
diff
changeset
|
1452 Кроме того, с помощью модификатора “<literal>=</literal>” можно задать точное |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1453 совпадение URI и location. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1454 При точном совпадении поиск сразу же прекращается. |
271 | 1455 Например, если запрос “<literal>/</literal>” случается часто, то |
1456 указав “<literal>location = /</literal>”, можно ускорить обработку | |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1457 этих запросов, так как поиск прекратится после первого же сравнения. |
625
af3f38e349eb
Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents:
617
diff
changeset
|
1458 Очевидно, что такой location не может иметь вложенные location’ы. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1459 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1460 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1461 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1462 <note> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1463 В версиях с 0.7.1 по 0.8.41, если запрос точно совпал с префиксным |
810
7c72c3e67e77
The "location" directive: improved wording.
Ruslan Ermilov <ru@nginx.com>
parents:
779
diff
changeset
|
1464 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
|
1465 то поиск тоже сразу же прекращается и регулярные выражения также |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1466 не проверяются. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1467 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1468 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1469 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1470 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1471 Проиллюстрируем вышесказанное примером: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1472 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1473 location = / { |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1474 [ конфигурация А ] |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1475 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1476 |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1477 location / { |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1478 [ конфигурация Б ] |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1479 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1480 |
738
0914bbb59fd2
Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents:
711
diff
changeset
|
1481 location /documents/ { |
0914bbb59fd2
Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents:
711
diff
changeset
|
1482 [ конфигурация В ] |
0914bbb59fd2
Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents:
711
diff
changeset
|
1483 } |
0914bbb59fd2
Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents:
711
diff
changeset
|
1484 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1485 location ^~ /images/ { |
738
0914bbb59fd2
Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents:
711
diff
changeset
|
1486 [ конфигурация Г ] |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1487 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1488 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1489 location ~* \.(gif|jpg|jpeg)$ { |
738
0914bbb59fd2
Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents:
711
diff
changeset
|
1490 [ конфигурация Д ] |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1491 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1492 </example> |
271 | 1493 Для запроса “<literal>/</literal>” будет выбрана конфигурация А, |
738
0914bbb59fd2
Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents:
711
diff
changeset
|
1494 для запроса “<literal>/index.html</literal>” — конфигурация Б, |
0914bbb59fd2
Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents:
711
diff
changeset
|
1495 для запроса “<literal>/documents/document.html</literal>” — конфигурация В, |
0914bbb59fd2
Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents:
711
diff
changeset
|
1496 для запроса “<literal>/images/1.gif</literal>” — конфигурация Г, |
0914bbb59fd2
Expanded "location" examples with another prefix location.
Ruslan Ermilov <ru@nginx.com>
parents:
711
diff
changeset
|
1497 а для запроса “<literal>/documents/1.jpg</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> |
271 | 1501 Префикс “<literal>@</literal>” задаёт именованный location. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1502 Такой location не используется при обычной обработке запросов, а |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1503 предназначен только для перенаправления в него запросов. |
625
af3f38e349eb
Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents:
617
diff
changeset
|
1504 Такие location’ы не могут быть вложенными и не могут содержать |
af3f38e349eb
Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents:
617
diff
changeset
|
1505 вложенные location’ы. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1506 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1507 |
914
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1508 <para> |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1509 Если location задан префиксной строкой со слэшом в конце |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1510 и запросы обрабатываются при помощи |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1511 <link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>, |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1512 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>, |
1194 | 1513 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_pass"/>, |
1514 <link doc="ngx_http_scgi_module.xml" id="scgi_pass"/> или | |
914
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1515 <link doc="ngx_http_memcached_module.xml" id="memcached_pass"/>, |
1257
ac7a5ee98768
Split long sentence into two.
Ruslan Ermilov <ru@nginx.com>
parents:
1194
diff
changeset
|
1516 происходит специальная обработка. |
ac7a5ee98768
Split long sentence into two.
Ruslan Ermilov <ru@nginx.com>
parents:
1194
diff
changeset
|
1517 В ответ на запрос с URI равным этой строке, но без завершающего слэша, |
914
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1518 будет возвращено постоянное перенаправление с кодом 301 |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1519 на URI с добавленным в конец слэшом. |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1520 Если такое поведение нежелательно, можно задать точное совпадение |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1521 URI и location, например: |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1522 <example> |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1523 location /user/ { |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1524 proxy_pass http://user.example.com; |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1525 } |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1526 |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1527 location = /user { |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1528 proxy_pass http://login.example.com; |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1529 } |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1530 </example> |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1531 </para> |
474a21f26a2a
Documented location behavior with proxying directives.
Vladimir Homutov <vl@nginx.com>
parents:
871
diff
changeset
|
1532 |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1533 <!-- |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1534 <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
|
1535 --> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1536 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1537 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1538 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1539 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1540 <directive name="log_not_found"> |
271 | 1541 <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
|
1542 <default>on</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1543 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1544 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1545 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1546 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1547 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1548 Разрешает или запрещает записывать в |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1549 <link doc="../ngx_core_module.xml" id="error_log"/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1550 ошибки о том, что файл не найден. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1551 </para> |
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 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1554 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1555 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1556 <directive name="log_subrequest"> |
271 | 1557 <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
|
1558 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1559 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1560 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1561 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1562 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1563 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1564 Разрешает или запрещает записывать в |
106
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
1565 <link doc="ngx_http_log_module.xml" id="access_log"/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1566 подзапросы. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1567 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1568 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1569 </directive> |
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 |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1572 <directive name="max_ranges"> |
271 | 1573 <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
|
1574 <default/> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1575 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1576 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1577 <context>location</context> |
499
76a8eca844d0
Documented that "max_ranges" appeared in 1.1.2.
Ruslan Ermilov <ru@nginx.com>
parents:
477
diff
changeset
|
1578 <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
|
1579 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1580 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1581 Ограничивает максимальное допустимое число диапазонов в запросах с |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1582 указанием диапазона запрашиваемых байт (byte-range requests). |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1583 Запросы, превышающие указанное ограничение, обрабатываются как |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1584 если бы они не содержали указания диапазонов. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1585 По умолчанию число диапазонов не ограничено. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1586 Значение 0 полностью запрещает поддержку диапазонов. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1587 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1588 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1589 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1590 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1591 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1592 <directive name="merge_slashes"> |
271 | 1593 <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
|
1594 <default>on</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1595 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1596 <context>server</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1597 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1598 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1599 Разрешает или запрещает преобразование URI путём замены двух и более подряд |
503
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
1600 идущих слэшей (“<literal>/</literal>”) на один. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1601 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1602 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1603 <para> |
280 | 1604 Необходимо иметь в виду, что это преобразование необходимо для корректной |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1605 проверки префиксных строк и регулярных выражений. |
364 | 1606 Если его не делать, то запрос “<literal>//scripts/one.php</literal>” |
1607 не попадёт в | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1608 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1609 location /scripts/ { |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1610 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1611 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1612 </example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1613 и может быть обслужен как статический файл. |
271 | 1614 Поэтому он преобразуется к виду “<literal>/scripts/one.php</literal>”. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1615 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1616 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1617 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1618 Запрет преобразования может понадобиться, если в URI используются имена, |
271 | 1619 закодированные методом base64, в котором задействован символ |
1620 “<literal>/</literal>”. | |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1621 Однако из соображений безопасности лучше избегать отключения преобразования. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1622 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1623 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1624 <para> |
1023
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
1625 Если директива указана на уровне <link id="server"/>, |
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
1626 её значение используется только в том случае, |
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
1627 если сервер является сервером по умолчанию. |
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
1628 Указанное значение распространяется на все виртуальные серверы, |
442
b423d725a932
Try to emphasize that "underscores_in_headers" and "merge_slashes",
Ruslan Ermilov <ru@nginx.com>
parents:
438
diff
changeset
|
1629 слушающие на том же адресе и порту. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1630 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1631 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1632 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1633 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1634 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1635 <directive name="msie_padding"> |
271 | 1636 <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
|
1637 <default>on</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1638 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1639 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1640 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1641 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1642 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1643 Разрешает или запрещает добавлять в ответы для MSIE со статусом больше 400 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1644 комментарий для увеличения размера ответа до 512 байт. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1645 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1646 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1647 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1648 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1649 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1650 <directive name="msie_refresh"> |
271 | 1651 <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
|
1652 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1653 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1654 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1655 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1656 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1657 <para> |
625
af3f38e349eb
Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents:
617
diff
changeset
|
1658 Разрешает или запрещает выдавать для MSIE клиентов refresh’ы вместо |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1659 перенаправлений. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1660 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1661 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1662 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1663 |
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 <directive name="open_file_cache"> |
271 | 1666 <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
|
1667 <syntax> |
271 | 1668 <literal>max</literal>=<value>N</value> |
1669 [<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
|
1670 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1671 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1672 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1673 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1674 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1675 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1676 Задаёт кэш, в котором могут храниться: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1677 <list type="bullet"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1678 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1679 <listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1680 дескрипторы открытых файлов, информация об их размерах и времени модификации; |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1681 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1682 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1683 <listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1684 информация о существовании каталогов; |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1685 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1686 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1687 <listitem> |
367
f4033b9bc4ec
- Removed unnecessary instances of unbreakable space.
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
1688 информация об ошибках поиска файла — “нет файла”, “нет прав на чтение” |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1689 и тому подобное. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1690 <note> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1691 Кэширование ошибок нужно разрешить отдельно директивой |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1692 <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
|
1693 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1694 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1695 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1696 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1697 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1698 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1699 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1700 У директивы есть следующие параметры: |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1701 <list type="tag"> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1702 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1703 <tag-name> |
271 | 1704 <literal>max</literal> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1705 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1706 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1707 задаёт максимальное число элементов в кэше; |
507 | 1708 при переполнении кэша удаляются наименее востребованные элементы (LRU); |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1709 </tag-desc> |
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 <tag-name> |
271 | 1712 <literal>inactive</literal> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1713 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1714 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1715 задаёт время, после которого элемент кэша удаляется, если к нему |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1716 не было обращений в течение этого времени; по умолчанию 60 секунд; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1717 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1718 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1719 <tag-name> |
271 | 1720 <literal>off</literal> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1721 </tag-name> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1722 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1723 запрещает кэш. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1724 </tag-desc> |
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 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1727 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1728 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1729 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1730 Пример: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1731 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1732 open_file_cache max=1000 inactive=20s; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1733 open_file_cache_valid 30s; |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1734 open_file_cache_min_uses 2; |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1735 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
|
1736 <!-- |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1737 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
|
1738 --> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1739 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1740 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1741 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1742 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1743 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1744 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1745 <directive name="open_file_cache_errors"> |
271 | 1746 <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
|
1747 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1748 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1749 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1750 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1751 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1752 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1753 Разрешает или запрещает кэширование ошибок поиска файлов в |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1754 <link id="open_file_cache"/>. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1755 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1756 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1757 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1758 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1759 |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1760 <!-- |
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 name="open_file_cache_events"> |
271 | 1763 <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
|
1764 <default>off</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1765 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1766 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1767 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1768 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1769 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1770 Разрешает использование событий ядра для проверки актуальности элементов |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1771 <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
|
1772 Эта директива работает только совместно с методом |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1773 <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
|
1774 Заметьте, что только 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
|
1775 поддерживают события для файловых систем произвольного типа. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1776 Другие операционные системы поддерживают события только для |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1777 основных файловых систем, таких как UFS или FFS. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1778 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1779 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1780 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1781 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1782 --> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1783 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1784 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1785 <directive name="open_file_cache_min_uses"> |
271 | 1786 <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
|
1787 <default>1</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1788 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1789 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1790 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1791 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1792 <para> |
271 | 1793 Задаёт минимальное <value>число</value> обращений к файлу |
1794 в течение времени, заданного параметром <literal>inactive</literal> | |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1795 директивы <link id="open_file_cache"/>, необходимых для того, чтобы дескриптор |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1796 файла оставался открытым в кэше. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1797 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1798 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1799 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1800 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1801 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1802 <directive name="open_file_cache_valid"> |
271 | 1803 <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
|
1804 <default>60s</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1805 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1806 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1807 <context>location</context> |
76
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 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1810 Определяет время, через которое следует проверять актуальность информации |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1811 об элементе в |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1812 <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
|
1813 <!-- |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1814 При включенном |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1815 <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
|
1816 открытые дескрипторы файлов проверяются лишь единожды, а затем обновляются |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1817 по факту их изменения. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1818 --> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1819 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1820 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1821 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1822 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1823 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1824 <directive name="optimize_server_names"> |
271 | 1825 <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
|
1826 <default>off</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1827 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1828 <context>server</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1829 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1830 <para> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1831 Директива устарела. |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1832 Вместо неё следует использовать директиву <link id="server_name_in_redirect"/>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1833 </para> |
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 <!-- |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1836 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1837 Разрешает или запрещает оптимизировать проверку имени хоста в name-based |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1838 виртуальных серверах. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1839 Проверка в частности влияет на имя хоста, используемого в перенаправлениях. |
381 | 1840 Если оптимизация разрешена и все name-based серверы, слушающие на одной |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1841 паре адрес:порт, имеют одинаковую конфигурацию, то во время исполнения запроса |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1842 имена не проверяются и в перенаправлениях используется первое имя сервера. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1843 Если в перенаправлении нужно использовать имя хоста, переданное клиентом, |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1844 то оптимизацию нужно выключить. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1845 </para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1846 --> |
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 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1849 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1850 |
1024
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1851 <directive name="output_buffers"> |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1852 <syntax><value>number</value> <value>size</value></syntax> |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1853 <default>1 32k</default> |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1854 <context>http</context> |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1855 <context>server</context> |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1856 <context>location</context> |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1857 |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1858 <para> |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1859 Задаёт <value>число</value> и <value>размер</value> буферов, |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1860 используемых при чтении ответа с диска. |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1861 </para> |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1862 |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1863 </directive> |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1864 |
e47971bf6619
Documented output_buffers directive.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1023
diff
changeset
|
1865 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1866 <directive name="port_in_redirect"> |
271 | 1867 <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
|
1868 <default>on</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1869 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1870 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1871 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1872 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1873 <para> |
625
af3f38e349eb
Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents:
617
diff
changeset
|
1874 Разрешает или запрещает указывать порт в перенаправлениях, выдаваемых nginx’ом. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1875 </para> |
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> |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
1878 Использование в перенаправлениях основного имени сервера управляется |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
1879 директивой <link id="server_name_in_redirect"/>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1880 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1881 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1882 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1883 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1884 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1885 <directive name="postpone_output"> |
271 | 1886 <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
|
1887 <default>1460</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1888 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1889 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1890 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1891 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1892 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1893 Если это возможно, то отправка данных клиенту будет отложена пока nginx не |
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 Значение 0 запрещает отложенную отправку данных. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1896 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1897 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1898 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1899 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1900 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1901 <directive name="read_ahead"> |
271 | 1902 <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
|
1903 <default>0</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1904 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1905 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1906 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1907 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1908 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1909 Задаёт ядру размер предчтения при работе с файлами. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1910 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1911 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1912 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1913 На Linux используется системный вызов |
271 | 1914 <literal>posix_fadvise(0, 0, 0, POSIX_FADV_SEQUENTIAL)</literal>, |
1915 поэтому параметр <value>размер</value> там игнорируется. | |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1916 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1917 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1918 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1919 На FreeBSD используется системный вызов |
271 | 1920 <literal>fcntl(O_READAHEAD, |
1921 </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
|
1922 появившийся во FreeBSD 9.0-CURRENT. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1923 Для FreeBSD 7 необходимо установить |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1924 <link url="http://sysoev.ru/freebsd/patch.readahead.txt">патч</link>. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1925 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1926 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1927 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1928 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1929 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1930 <directive name="recursive_error_pages"> |
271 | 1931 <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
|
1932 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1933 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1934 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1935 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1936 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1937 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1938 Разрешает или запрещает делать несколько перенаправлений через директиву |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1939 <link id="error_page"/>. |
709
a4648185190a
Fixed the link internal to the module.
Ruslan Ermilov <ru@nginx.com>
parents:
679
diff
changeset
|
1940 Число таких перенаправлений <link id="internal">ограничено</link>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1941 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1942 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1943 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1944 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1945 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1946 <directive name="request_pool_size"> |
271 | 1947 <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
|
1948 <default>4k</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1949 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1950 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1951 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1952 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1953 Позволяет производить точную настройку выделений памяти |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1954 под конкретные запросы. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1955 Эта директива не оказывает существенного влияния на |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1956 производительность, и её не следует использовать. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1957 </para> |
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> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1960 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1961 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1962 <directive name="reset_timedout_connection"> |
364 | 1963 <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
|
1964 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1965 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1966 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1967 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1968 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1969 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1970 Разрешает или запрещает сброс соединений по таймауту. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1971 Сброс делается следующим образом. |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1972 Перед закрытием сокета для него задаётся параметр |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1973 <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
|
1974 с таймаутом 0. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
1975 После этого при закрытии сокета клиенту отсылается TCP RST, а вся память, |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1976 связанная с этим сокетом, освобождается. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1977 Это позволяет избежать длительного нахождения уже закрытого сокета в |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1978 состоянии FIN_WAIT1 с заполненными буферами. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1979 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1980 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1981 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1982 Необходимо отметить, что keep-alive соединения по истечении таймаута |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1983 закрываются обычным образом. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1984 </para> |
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 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1987 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1988 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
1989 <directive name="resolver"> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1990 <syntax> |
1031
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
1991 <value>адрес</value> ... |
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
1992 [<literal>valid</literal>=<value>время</value>] |
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
1993 [<literal>ipv6</literal>=<literal>on</literal>|<literal>off</literal>]</syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
79
diff
changeset
|
1994 <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> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
1997 <context>location</context> |
76
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> |
318
4a0fe9283dc7
Word polishing in the description of the "server" directive.
Ruslan Ermilov <ru@nginx.com>
parents:
280
diff
changeset
|
2000 Задаёт серверы DNS, используемые для преобразования имён вышестоящих серверов |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2001 в адреса, например: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2002 <example> |
527
58d79f8c412d
Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents:
522
diff
changeset
|
2003 resolver 127.0.0.1 [::1]:5353; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2004 </example> |
527
58d79f8c412d
Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents:
522
diff
changeset
|
2005 Адрес может быть указан в виде доменного имени или IP-адреса, |
566 | 2006 и необязательного порта (1.3.1, 1.2.2). |
527
58d79f8c412d
Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents:
522
diff
changeset
|
2007 Если порт не указан, используется порт 53. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2008 Серверы DNS опрашиваются циклически. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2009 <note> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2010 До версии 1.1.7 можно было задать лишь один DNS-сервер. |
527
58d79f8c412d
Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents:
522
diff
changeset
|
2011 Задание DNS-серверов с помощью IPv6-адресов поддерживается |
566 | 2012 начиная с версий 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
|
2013 </note> |
1031
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
2014 По умолчанию nginx будет искать как IPv4-, так и IPv6-адреса |
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
2015 при преобразовании имён в адреса. |
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
2016 Если поиск IPv6-адресов нежелателен, |
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
2017 можно указать параметр <literal>ipv6=off</literal>. |
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
2018 <note> |
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
2019 Преобразование имён в IPv6-адреса поддерживается |
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
2020 начиная с версии 1.5.8. |
f7f23f5928ef
Documented "resolver ipv6=" parameter.
Ruslan Ermilov <ru@nginx.com>
parents:
1024
diff
changeset
|
2021 </note> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2022 По умолчанию nginx кэширует ответы, используя значение TTL из ответа. |
271 | 2023 Необязательный параметр <literal>valid</literal> позволяет это |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2024 переопределить: |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2025 <example> |
527
58d79f8c412d
Documented 1.3.1 changes in "resolver".
Ruslan Ermilov <ru@nginx.com>
parents:
522
diff
changeset
|
2026 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
|
2027 </example> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2028 <note> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2029 До версии 1.1.9 настройка времени кэширования была невозможна |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2030 и nginx всегда кэшировал ответы на срок в 5 минут. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2031 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2032 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2033 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2034 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2035 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2036 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2037 <directive name="resolver_timeout"> |
271 | 2038 <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
|
2039 <default>30s</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2040 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2041 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2042 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2043 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2044 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2045 Задаёт таймаут для преобразования имени в адрес, например: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2046 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2047 resolver_timeout 5s; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2048 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2049 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2050 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2051 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2052 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2053 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2054 <directive name="root"> |
271 | 2055 <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
|
2056 <default>html</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2057 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2058 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2059 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2060 <context>if в location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2061 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2062 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2063 Задаёт корневой каталог для запросов. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2064 Например, при такой конфигурации |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2065 <example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2066 location /i/ { |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2067 root /data/w3; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2068 } |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2069 </example> |
271 | 2070 в ответ на запрос “<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
|
2071 <path>/data/w3/i/top.gif</path>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2072 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2073 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2074 <para> |
271 | 2075 В значении параметра <value>путь</value> можно использовать переменные, |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2076 кроме <var>$document_root</var> и <var>$realpath_root</var>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2077 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2078 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2079 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2080 Путь к файлу формируется путём простого добавления URI к значению директивы |
271 | 2081 <literal>root</literal>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2082 Если же URI необходимо поменять, следует воспользоваться директивой |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2083 <link id="alias"/>. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2084 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2085 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2086 </directive> |
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 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2089 <directive name="satisfy"> |
271 | 2090 <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
|
2091 <default>all</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2092 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2093 <context>server</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2094 <context>location</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2095 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2096 <para> |
971
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
966
diff
changeset
|
2097 Разрешает доступ, если все (<literal>all</literal>) |
271 | 2098 или хотя бы один (<literal>any</literal>) из модулей |
971
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
966
diff
changeset
|
2099 <link doc="ngx_http_access_module.xml">ngx_http_access_module</link>, |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
966
diff
changeset
|
2100 <link doc="ngx_http_auth_basic_module.xml">ngx_http_auth_basic_module</link> или |
6316a7579448
Documented the "ngx_http_auth_request" module.
Vladimir Homutov <vl@nginx.com>
parents:
966
diff
changeset
|
2101 <link doc="ngx_http_auth_request_module.xml">ngx_http_auth_request_module</link> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2102 разрешают доступ. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2103 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2104 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2105 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2106 Пример: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2107 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2108 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2109 satisfy any; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2110 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2111 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
|
2112 deny all; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2113 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2114 auth_basic "closed site"; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2115 auth_basic_user_file conf/htpasswd; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2116 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2117 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2118 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2119 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2120 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2121 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2122 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2123 <directive name="satisfy_any"> |
271 | 2124 <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
|
2125 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2126 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2127 <context>server</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2128 <context>location</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2129 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2130 <para> |
406
98dac2bd7598
Links with mixed underscores and spaces were hard to read, eliminated them.
Ruslan Ermilov <ru@nginx.com>
parents:
400
diff
changeset
|
2131 Эта директива была заменена параметром <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
|
2132 директивы <link id="satisfy"/>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2133 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2134 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2135 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2136 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2137 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2138 <directive name="send_lowat"> |
271 | 2139 <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
|
2140 <default>0</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2141 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2142 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2143 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2144 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2145 <para> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2146 При установке этой директивы в ненулевое значение nginx будет пытаться |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2147 минимизировать число операций отправки на клиентских сокетах либо при |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2148 помощи флага <c-def>NOTE_LOWAT</c-def> метода |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2149 <link doc="../events.xml" id="kqueue"/>, |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2150 либо при помощи параметра сокета <c-def>SO_SNDLOWAT</c-def>. |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2151 В обоих случаях будет использован указанный <value>размер</value>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2152 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2153 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2154 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2155 Эта директива игнорируется на Linux, Solaris и Windows. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2156 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2157 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2158 </directive> |
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 <directive name="send_timeout"> |
271 | 2162 <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
|
2163 <default>60s</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2164 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2165 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2166 <context>location</context> |
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 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2169 Задаёт таймаут при передаче ответа клиенту. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2170 Таймаут устанавливается не на всю передачу ответа, |
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 Если по истечении этого времени клиент ничего не примет, |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2173 соединение будет закрыто. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2174 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2175 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2176 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2177 |
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 <directive name="sendfile"> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2180 |
271 | 2181 <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
|
2182 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2183 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2184 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2185 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2186 <context>if в location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2187 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2188 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2189 Разрешает или запрещает использовать |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2190 <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
|
2191 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2192 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2193 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2194 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2195 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2196 <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
|
2197 |
271 | 2198 <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
|
2199 <default>0</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2200 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2201 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2202 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2203 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2204 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2205 При установке в ненулевое значение ограничивает объём данных, |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2206 который может передан за один вызов <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
|
2207 Без этого ограничения одно быстрое соединение может целиком |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2208 захватить рабочий процесс. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2209 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2210 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2211 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2212 |
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 <directive name="server"> |
108
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
106
diff
changeset
|
2215 <syntax block="yes"/> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
79
diff
changeset
|
2216 <default/> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2217 <context>http</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2218 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2219 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2220 Задаёт конфигурацию для виртуального сервера. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2221 Чёткого разделения виртуальных серверов на IP-based (на основании IP-адреса) |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2222 и 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
|
2223 Вместо этого директивами <link id="listen"/> описываются все |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2224 адреса и порты, на которых нужно принимать соединения для этого сервера, |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2225 а в директиве <link id="server_name"/> указываются все имена серверов. |
522
ef11546f75ee
Translated "request_processing" into Russian, removed "virtual_hosts"
Ruslan Ermilov <ru@nginx.com>
parents:
507
diff
changeset
|
2226 Примеры конфигураций описаны в документе |
ef11546f75ee
Translated "request_processing" into Russian, removed "virtual_hosts"
Ruslan Ermilov <ru@nginx.com>
parents:
507
diff
changeset
|
2227 “<link doc="request_processing.xml"/>”. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2228 </para> |
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 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2231 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2232 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2233 <directive name="server_name"> |
271 | 2234 <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
|
2235 <default>""</default> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2236 <context>server</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2237 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2238 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2239 Задаёт имена виртуального сервера, например: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2240 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2241 server { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2242 server_name example.com www.example.com; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2243 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2244 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2245 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2246 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2247 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2248 Первое имя становится основным именем сервера. |
646
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2249 </para> |
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2250 |
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2251 <para> |
271 | 2252 В именах серверов можно использовать звёздочку (“<literal>*</literal>”) |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2253 для замены первой или последней части имени: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2254 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2255 server { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2256 server_name example.com *.example.com www.example.*; |
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 </example> |
646
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2259 Такие имена называются именами с маской. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2260 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2261 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2262 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2263 Два первых вышеприведённых имени можно объединить в одно: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2264 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2265 server { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2266 server_name .example.com; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2267 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2268 </example> |
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 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2272 В качестве имени сервера можно также использовать регулярное выражение, |
271 | 2273 указав перед ним тильду (“<literal>~</literal>”): |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2274 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2275 server { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2276 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
|
2277 } |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2278 </example> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2279 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2280 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2281 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2282 Регулярное выражение может содержать выделения (0.7.40), |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2283 которые могут затем использоваться в других директивах: |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2284 <example> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2285 server { |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2286 server_name ~^(www\.)?(.+)$; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2287 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2288 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2289 root /sites/$2; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2290 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2291 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2292 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2293 server { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2294 server_name _; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2295 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2296 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2297 root /sites/default; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2298 } |
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 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2301 </para> |
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 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2304 Именованные выделения в регулярном выражении создают переменные (0.8.25), |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2305 которые могут затем использоваться в других директивах: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2306 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2307 server { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2308 server_name ~^(www\.)?(?<domain>.+)$; |
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 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2311 root /sites/$domain; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2312 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2313 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2314 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2315 server { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2316 server_name _; |
76
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 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2319 root /sites/default; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2320 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2321 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2322 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2323 </para> |
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> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2326 Если параметр директивы установлен в “<var>$hostname</var>” (0.9.4), то |
646
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2327 подставляется имя хоста (hostname) машины. |
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2328 </para> |
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2329 |
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2330 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2331 Возможно также указать пустое имя сервера (0.7.11): |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2332 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2333 server { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2334 server_name www.example.com ""; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2335 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2336 </example> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2337 Это позволяет обрабатывать запросы без поля <header>Host</header> заголовка |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2338 запроса в этом сервере, а не в сервере по умолчанию для данной пары адрес:порт. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2339 Это настройка по умолчанию. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2340 <note> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2341 До 0.8.48 по умолчанию использовалось имя хоста (hostname) машины. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2342 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2343 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2344 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2345 <para> |
587
5bb7716cae7e
Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
2346 При поиске виртуального сервера по имени, |
5bb7716cae7e
Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
2347 если имени соответствует несколько из указанных вариантов, |
646
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2348 например, одновременно подходят и имя с маской, и регулярное выражение, |
587
5bb7716cae7e
Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
2349 будет выбран первый подходящий вариант в следующем порядке приоритета: |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2350 <list type="enum"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2351 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2352 <listitem> |
646
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2353 точное имя |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2354 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2355 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2356 <listitem> |
587
5bb7716cae7e
Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
2357 самое длинное имя с маской в начале, |
5bb7716cae7e
Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
2358 например “<literal>*.example.com</literal>” |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2359 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2360 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2361 <listitem> |
587
5bb7716cae7e
Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
2362 самое длинное имя с маской в конце, |
5bb7716cae7e
Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
2363 например “<literal>mail.*</literal>” |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2364 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2365 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2366 <listitem> |
587
5bb7716cae7e
Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
2367 первое подходящее регулярное выражение |
5bb7716cae7e
Documented in more depth how server names are matched.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
2368 (в порядке следования в конфигурационном файле) |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2369 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2370 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2371 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2372 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2373 |
646
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2374 <para> |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2375 Подробнее имена серверов обсуждаются в отдельном |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2376 <link doc="server_names.xml">документе</link>. |
646
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2377 </para> |
2577ab264d1e
Updated the Russian version of the "server_name" directive.
Vladimir Homutov <vl@nginx.com>
parents:
629
diff
changeset
|
2378 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2379 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2380 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2381 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2382 <directive name="server_name_in_redirect"> |
271 | 2383 <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
|
2384 <default>off</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2385 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2386 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2387 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2388 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2389 <para> |
625
af3f38e349eb
Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents:
617
diff
changeset
|
2390 Разрешает или запрещает использовать в перенаправлениях, выдаваемых nginx’ом, |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2391 основное имя сервера, задаваемое директивой |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2392 <link id="server_name"/>. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2393 Если использование основного имени сервера запрещено, то используется имя, |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2394 указанное в поле <header>Host</header> заголовка запроса. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2395 Если же этого поля нет, то используется IP-адрес сервера. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2396 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2397 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2398 <para> |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2399 Использование в перенаправлениях порта управляется |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2400 директивой <link id="port_in_redirect"/>. |
76
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 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2403 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2404 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2405 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2406 <directive name="server_names_hash_bucket_size"> |
271 | 2407 <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
|
2408 <default>32|64|128</default> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2409 <context>http</context> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2410 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2411 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2412 Задаёт размер корзины в хэш-таблицах имён серверов. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2413 Значение по умолчанию зависит от размера строки кэша процессора. |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2414 Подробнее настройка хэш-таблиц обсуждается в отдельном |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2415 <link doc="../hash.xml">документе</link>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2416 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2417 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2418 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2419 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2420 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2421 <directive name="server_names_hash_max_size"> |
271 | 2422 <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
|
2423 <default>512</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2424 <context>http</context> |
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 <para> |
271 | 2427 Задаёт максимальный <value>размер</value> хэш-таблиц имён серверов. |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2428 Подробнее настройка хэш-таблиц обсуждается в отдельном |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2429 <link doc="../hash.xml">документе</link>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2430 </para> |
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 </directive> |
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 <directive name="server_tokens"> |
271 | 2436 <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
|
2437 <default>on</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2438 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2439 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2440 <context>location</context> |
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 <para> |
625
af3f38e349eb
Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents:
617
diff
changeset
|
2443 Разрешает или запрещает выдавать версию nginx’а в сообщениях об ошибках и |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2444 в поле <header>Server</header> заголовка ответа. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2445 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2446 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2447 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2448 |
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 <directive name="tcp_nodelay"> |
271 | 2451 <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
|
2452 <default>on</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2453 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2454 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2455 <context>location</context> |
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 <para> |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
2458 Разрешает или запрещает использование параметра <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
|
2459 Параметр включаются только при переходе соединения в состояние keep-alive. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2460 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2461 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2462 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2463 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2464 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2465 <directive name="tcp_nopush"> |
271 | 2466 <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
|
2467 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2468 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2469 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2470 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2471 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2472 <para> |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
2473 Разрешает или запрещает использование параметра сокета |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2474 <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
|
2475 <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
|
2476 Параметр включаются только при использовании <link id="sendfile"/>. |
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
2477 Включение параметра позволяет |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2478 <list type="bullet"> |
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 <listitem> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2481 передавать заголовок ответа и начало файла в одном пакете |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2482 в Linux и во FreeBSD 4.*; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2483 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2484 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2485 <listitem> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2486 передавать файл полными пакетами. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2487 </listitem> |
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 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2490 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2491 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2492 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2493 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2494 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2495 <directive name="try_files"> |
364 | 2496 <syntax><value>файл</value> ... <value>uri</value></syntax> |
2497 <syntax><value>файл</value> ... =<value>код</value></syntax> | |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
79
diff
changeset
|
2498 <default/> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2499 <context>server</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2500 <context>location</context> |
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 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2503 Проверяет существование файлов в заданном порядке и использует |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2504 для обработки запроса первый найденный файл, причём обработка |
625
af3f38e349eb
Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents:
617
diff
changeset
|
2505 делается в контексте этого же location’а. |
271 | 2506 Путь к файлу строится из параметра <value>файл</value> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2507 в соответствии с директивами |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2508 <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
|
2509 С помощью слэша в конце имени можно проверить существование каталога, |
271 | 2510 например, “<literal>$uri/</literal>”. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2511 В случае, если ни один файл не найден, то делается внутреннее |
271 | 2512 перенаправление на <value>uri</value>, заданный последним параметром. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2513 Например: |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2514 <example> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2515 location /images/ { |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2516 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
|
2517 } |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2518 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2519 location = /images/default.gif { |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2520 expires 30s; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2521 } |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2522 </example> |
271 | 2523 Последний параметр может также указывать на именованный location, |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2524 как в примерах ниже. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2525 С версии 0.7.51 последний параметр может также быть <value>кодом</value>: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2526 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2527 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2528 try_files $uri $uri/index.html $uri.html =404; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2529 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2530 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2531 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2532 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2533 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2534 Пример использования при проксировании Mongrel: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2535 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2536 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2537 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
|
2538 $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
|
2539 @mongrel; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2540 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2541 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2542 location @mongrel { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2543 proxy_pass http://mongrel; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2544 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2545 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2546 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2547 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2548 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2549 Пример использования вместе с Drupal/FastCGI: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2550 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2551 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2552 try_files $uri $uri/ @drupal; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2553 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2554 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2555 location ~ \.php$ { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2556 try_files $uri @drupal; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2557 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2558 fastcgi_pass ...; |
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 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
|
2561 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
|
2562 fastcgi_param QUERY_STRING $args; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2563 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2564 ... прочие fastcgi_param |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2565 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2566 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2567 location @drupal { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2568 fastcgi_pass ...; |
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 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
|
2571 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
|
2572 fastcgi_param QUERY_STRING q=$uri&$args; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2573 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2574 ... прочие fastcgi_param |
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 </example> |
271 | 2577 В следующем примере директива <literal>try_files</literal> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2578 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2579 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2580 try_files $uri $uri/ @drupal; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2581 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2582 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2583 аналогична директивам |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2584 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2585 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2586 error_page 404 = @drupal; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2587 log_not_found off; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2588 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2589 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2590 А здесь |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2591 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2592 location ~ \.php$ { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2593 try_files $uri @drupal; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2594 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2595 fastcgi_pass ...; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2596 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2597 fastcgi_param SCRIPT_FILENAME /path/to$fastcgi_script_name; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2598 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2599 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2600 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2601 </example> |
271 | 2602 <literal>try_files</literal> проверяет существование PHP-файла, |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2603 прежде чем передать запрос FastCGI-серверу. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2604 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2605 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2606 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2607 Пример использования вместе с Wordpress и Joomla: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2608 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2609 location / { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2610 try_files $uri $uri/ @wordpress; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2611 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2612 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2613 location ~ \.php$ { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2614 try_files $uri @wordpress; |
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 fastcgi_pass ...; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2617 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2618 fastcgi_param SCRIPT_FILENAME /path/to$fastcgi_script_name; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2619 ... прочие fastcgi_param |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2620 } |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2621 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2622 location @wordpress { |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2623 fastcgi_pass ...; |
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 fastcgi_param SCRIPT_FILENAME /path/to/index.php; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2626 ... прочие fastcgi_param |
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 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2629 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2630 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2631 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2632 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2633 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2634 <directive name="types"> |
108
72524ae53106
Explicitly marked directives with the block syntax. Such directives will
Ruslan Ermilov <ru@nginx.com>
parents:
106
diff
changeset
|
2635 <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
|
2636 <default> |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
2637 text/html html; |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
2638 image/gif gif; |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
2639 image/jpeg jpg; |
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
99
diff
changeset
|
2640 </default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2641 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2642 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2643 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2644 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2645 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2646 Задаёт соответствие расширений имён файлов и MIME-типов ответов. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2647 Расширения нечувствительны к регистру символов. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2648 Одному MIME-типу может соответствовать несколько расширений, например: |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2649 <example> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2650 types { |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2651 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
|
2652 application/octet-stream deb; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2653 application/octet-stream dmg; |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2654 } |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2655 </example> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2656 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2657 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2658 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2659 Достаточно полная таблица соответствий входит в дистрибутив nginx |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2660 и находится в файле <path>conf/mime.types</path>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2661 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2662 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2663 <para> |
966 | 2664 Для того чтобы для определённого location’а для всех ответов |
271 | 2665 выдавался 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
|
2666 можно использовать следующее: |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2667 <example> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2668 location /download/ { |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2669 types { } |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2670 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
|
2671 } |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2672 </example> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2673 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2674 |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2675 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2676 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2677 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2678 <directive name="types_hash_bucket_size"> |
271 | 2679 <syntax><value>размер</value></syntax> |
1132
8bdb4eb27f48
Documented the new default of "types_hash_bucket_size".
Ruslan Ermilov <ru@nginx.com>
parents:
1108
diff
changeset
|
2680 <default>64</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2681 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2682 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2683 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2684 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2685 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2686 Задаёт размер корзины в хэш-таблицах типов. |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2687 Подробнее настройка хэш-таблиц обсуждается в отдельном |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2688 <link doc="../hash.xml">документе</link>. |
1132
8bdb4eb27f48
Documented the new default of "types_hash_bucket_size".
Ruslan Ermilov <ru@nginx.com>
parents:
1108
diff
changeset
|
2689 <note> |
8bdb4eb27f48
Documented the new default of "types_hash_bucket_size".
Ruslan Ermilov <ru@nginx.com>
parents:
1108
diff
changeset
|
2690 До версии 1.5.13 |
8bdb4eb27f48
Documented the new default of "types_hash_bucket_size".
Ruslan Ermilov <ru@nginx.com>
parents:
1108
diff
changeset
|
2691 значение по умолчанию зависело от размера строки кэша процессора. |
8bdb4eb27f48
Documented the new default of "types_hash_bucket_size".
Ruslan Ermilov <ru@nginx.com>
parents:
1108
diff
changeset
|
2692 </note> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2693 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2694 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2695 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2696 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2697 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2698 <directive name="types_hash_max_size"> |
271 | 2699 <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
|
2700 <default>1024</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2701 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2702 <context>server</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2703 <context>location</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2704 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2705 <para> |
271 | 2706 Задаёт максимальный <value>размер</value> хэш-таблиц типов. |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2707 Подробнее настройка хэш-таблиц обсуждается в отдельном |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2708 <link doc="../hash.xml">документе</link>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2709 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2710 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2711 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2712 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2713 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2714 <directive name="underscores_in_headers"> |
271 | 2715 <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
|
2716 <default>off</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2717 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2718 <context>server</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2719 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2720 <para> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2721 Разрешает или запрещает использование символов подчёркивания в |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2722 полях заголовка запроса клиента. |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2723 Если использование символов подчёркивания запрещено, поля заголовка запроса, в |
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2724 именах которых есть подчёркивания, |
253
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 <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
|
2727 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2728 |
426
1d6dc85ed324
Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents:
419
diff
changeset
|
2729 <para> |
1023
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
2730 Если директива указана на уровне <link id="server"/>, |
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
2731 её значение используется только в том случае, |
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
2732 если сервер является сервером по умолчанию. |
375055da60fa
Improved wording of merge_slashes etc. (ticket #448).
Maxim Dounin <mdounin@mdounin.ru>
parents:
971
diff
changeset
|
2733 Указанное значение распространяется на все виртуальные серверы, |
426
1d6dc85ed324
Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents:
419
diff
changeset
|
2734 слушающие на том же адресе и порту. |
1d6dc85ed324
Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents:
419
diff
changeset
|
2735 </para> |
1d6dc85ed324
Specifying "ignore_invalid_headers" or "underscores_in_headers" on the
Ruslan Ermilov <ru@nginx.com>
parents:
419
diff
changeset
|
2736 |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2737 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2738 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2739 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2740 <directive name="variables_hash_bucket_size"> |
271 | 2741 <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
|
2742 <default>64</default> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2743 <context>http</context> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2744 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2745 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2746 Задаёт размер корзины в хэш-таблице переменных. |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2747 Подробнее настройка хэш-таблиц обсуждается в отдельном |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2748 <link doc="../hash.xml">документе</link>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2749 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2750 |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2751 </directive> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2752 |
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 <directive name="variables_hash_max_size"> |
271 | 2755 <syntax><value>размер</value></syntax> |
1108
a0543e9213e7
New default value for the variables_hash_max_size directive.
Andrei Belov <defan@nginx.com>
parents:
1097
diff
changeset
|
2756 <default>1024</default> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2757 <context>http</context> |
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 <para> |
271 | 2760 Задаёт максимальный <value>размер</value> хэш-таблицы переменных. |
659
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2761 Подробнее настройка хэш-таблиц обсуждается в отдельном |
77a3314c74a7
Avoid the uses of second person.
Ruslan Ermilov <ru@nginx.com>
parents:
651
diff
changeset
|
2762 <link doc="../hash.xml">документе</link>. |
1108
a0543e9213e7
New default value for the variables_hash_max_size directive.
Andrei Belov <defan@nginx.com>
parents:
1097
diff
changeset
|
2763 <note> |
a0543e9213e7
New default value for the variables_hash_max_size directive.
Andrei Belov <defan@nginx.com>
parents:
1097
diff
changeset
|
2764 До версии 1.5.13 по умолчанию использовалось значение 512. |
a0543e9213e7
New default value for the variables_hash_max_size directive.
Andrei Belov <defan@nginx.com>
parents:
1097
diff
changeset
|
2765 </note> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2766 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2767 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2768 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2769 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2770 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2771 |
364 | 2772 |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2773 <section id="variables" name="Встроенные переменные"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2774 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2775 <para> |
364 | 2776 Модуль <literal>ngx_http_core_module</literal> поддерживает встроенные |
2777 переменные, имена которых совпадают с именами переменных веб-сервера Apache. | |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2778 Прежде всего, это переменные, представляющие из себя поля заголовка |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2779 запроса клиента, такие как <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
|
2780 и тому подобное. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2781 Кроме того, есть и другие переменные: |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2782 <list type="tag"> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2783 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2784 <tag-name id="var_arg_"><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
|
2785 <tag-desc> |
271 | 2786 аргумент <value>имя</value> в строке запроса |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2787 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2788 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2789 <tag-name id="var_args"><var>$args</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2790 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2791 аргументы в строке запроса |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2792 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2793 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2794 <tag-name id="var_binary_remote_addr"><var>$binary_remote_addr</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2795 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2796 адрес клиента в бинарном виде, длина значения всегда 4 байта |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2797 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2798 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2799 <tag-name id="var_body_bytes_sent"><var>$body_bytes_sent</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2800 <tag-desc> |
769
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2801 число байт, переданное клиенту, без учёта заголовка ответа; |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2802 переменная совместима с параметром “<literal>%B</literal>” модуля Apache |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2803 <literal>mod_log_config</literal> |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2804 </tag-desc> |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2805 |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2806 <tag-name id="var_bytes_sent"><var>$bytes_sent</var></tag-name> |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2807 <tag-desc> |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2808 число байт, переданное клиенту (1.3.8, 1.2.5) |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2809 </tag-desc> |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2810 |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2811 <tag-name id="var_connection"><var>$connection</var></tag-name> |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2812 <tag-desc> |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2813 порядковый номер соединения (1.3.8, 1.2.5) |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2814 </tag-desc> |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2815 |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2816 <tag-name id="var_connection_requests"><var>$connection_requests</var></tag-name> |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2817 <tag-desc> |
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
2818 текущее число запросов в соединении (1.3.8, 1.2.5) |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2819 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2820 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2821 <tag-name id="var_content_length"><var>$content_length</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2822 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2823 поле <header>Content-Length</header> заголовка запроса |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2824 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2825 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2826 <tag-name id="var_content_type"><var>$content_type</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2827 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2828 поле <header>Content-Type</header> заголовка запроса |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2829 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2830 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2831 <tag-name id="var_cookie_"><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
|
2832 <tag-desc> |
271 | 2833 cookie <value>имя</value> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2834 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2835 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2836 <tag-name id="var_document_root"><var>$document_root</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2837 <tag-desc> |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
2838 значение директивы <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
|
2839 для текущего запроса |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2840 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2841 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2842 <tag-name id="var_document_uri"><var>$document_uri</var></tag-name> |
253
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 то же, что и <var>$uri</var> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2845 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2846 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2847 <tag-name id="var_host"><var>$host</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2848 <tag-desc> |
940
ded8f4a5de28
Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents:
914
diff
changeset
|
2849 в порядке приоритета: |
ded8f4a5de28
Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents:
914
diff
changeset
|
2850 имя хоста из строки запроса, или |
ded8f4a5de28
Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents:
914
diff
changeset
|
2851 имя хоста из поля <header>Host</header> заголовка запроса, или |
ded8f4a5de28
Corrected description of the $host variable.
Ruslan Ermilov <ru@nginx.com>
parents:
914
diff
changeset
|
2852 имя сервера, соответствующего запросу |
253
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 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2855 <tag-name id="var_hostname"><var>$hostname</var></tag-name> |
253
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 имя хоста |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2858 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2859 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2860 <tag-name id="var_http_"><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
|
2861 <tag-desc> |
448
92672f6f0ee1
Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents:
442
diff
changeset
|
2862 произвольное поле заголовка запроса; |
92672f6f0ee1
Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents:
442
diff
changeset
|
2863 последняя часть имени переменной соответствует имени поля, приведённому |
92672f6f0ee1
Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents:
442
diff
changeset
|
2864 к нижнему регистру, с заменой символов тире на символы подчёркивания |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2865 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2866 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2867 <tag-name id="var_https"><var>$https</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2868 <tag-desc> |
271 | 2869 “<literal>on</literal>” |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2870 если соединение работает в режиме SSL, |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2871 либо пустая строка |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2872 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2873 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2874 <tag-name id="var_is_args"><var>$is_args</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2875 <tag-desc> |
271 | 2876 “<literal>?</literal>”, если в строке запроса есть аргументы, |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2877 и пустая строка, если их нет |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2878 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2879 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2880 <tag-name id="var_limit_rate"><var>$limit_rate</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2881 <tag-desc> |
767
1bb8b733416a
Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents:
741
diff
changeset
|
2882 установка этой переменной позволяет ограничивать скорость |
1bb8b733416a
Clarified the description of the limit_rate directive
Ruslan Ermilov <ru@nginx.com>
parents:
741
diff
changeset
|
2883 передачи ответа, см. <link id="limit_rate"/> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2884 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2885 |
771
47ad88faaa3f
$msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents:
769
diff
changeset
|
2886 <tag-name id="var_msec"><var>$msec</var></tag-name> |
47ad88faaa3f
$msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents:
769
diff
changeset
|
2887 <tag-desc> |
779
32b8498cfb40
$msec and $request_time have become generic variables in 1.2.6.
Ruslan Ermilov <ru@nginx.com>
parents:
771
diff
changeset
|
2888 текущее время в секундах с точностью до миллисекунд (1.3.9, 1.2.6) |
771
47ad88faaa3f
$msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents:
769
diff
changeset
|
2889 </tag-desc> |
47ad88faaa3f
$msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents:
769
diff
changeset
|
2890 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2891 <tag-name id="var_nginx_version"><var>$nginx_version</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2892 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2893 версия nginx |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2894 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2895 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2896 <tag-name id="var_pid"><var>$pid</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2897 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2898 номер (PID) рабочего процесса |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2899 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2900 |
826
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
2901 <tag-name id="var_pipe"><var>$pipe</var></tag-name> |
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
2902 <tag-desc> |
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
2903 “<literal>p</literal>” если запрос был pipelined, иначе “<literal>.</literal>” |
840
9dab69f2b71d
Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents:
835
diff
changeset
|
2904 (1.3.12, 1.2.7) |
826
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
2905 </tag-desc> |
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
2906 |
1097
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
2907 <tag-name id="var_proxy_protocol_addr"><var>$proxy_protocol_addr</var></tag-name> |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
2908 <tag-desc> |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
2909 адрес клиента, полученный из заголовка протокола PROXY, либо пустая строка |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
2910 (1.5.12) |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
2911 <para> |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
2912 Протокол PROXY должен быть предварительно включён при помощи установки |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
2913 параметра <literal>proxy_protocol</literal> в директиве <link id="listen"/>. |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
2914 </para> |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
2915 </tag-desc> |
eeb690d4212b
Documented the PROXY protocol support.
Yaroslav Zhuravlev <yar@nginx.com>
parents:
1037
diff
changeset
|
2916 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2917 <tag-name id="var_query_string"><var>$query_string</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2918 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2919 то же, что и <var>$args</var> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2920 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2921 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2922 <tag-name id="var_realpath_root"><var>$realpath_root</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2923 <tag-desc> |
436
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
2924 абсолютный путь, соответствующий |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
2925 значению директивы <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
|
2926 для текущего запроса, |
3a9f39341c7c
- Documented the "from" parameter of the "disable_symlinks" directive,
Ruslan Ermilov <ru@nginx.com>
parents:
431
diff
changeset
|
2927 в котором все символические ссылки преобразованы в реальные пути |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2928 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2929 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2930 <tag-name id="var_remote_addr"><var>$remote_addr</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2931 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2932 адрес клиента |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2933 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2934 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2935 <tag-name id="var_remote_port"><var>$remote_port</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2936 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2937 порт клиента |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2938 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2939 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2940 <tag-name id="var_remote_user"><var>$remote_user</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2941 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2942 имя пользователя, использованное в Basic аутентификации |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2943 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2944 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2945 <tag-name id="var_request"><var>$request</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2946 <tag-desc> |
431
0412333658fe
Consistent translation of "original".
Ruslan Ermilov <ru@nginx.com>
parents:
429
diff
changeset
|
2947 первоначальная строка запроса целиком |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2948 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2949 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2950 <tag-name id="var_request_body"><var>$request_body</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2951 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2952 тело запроса |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2953 <para> |
625
af3f38e349eb
Removed terminal whitespace and fixed apostrophes used.
Ruslan Ermilov <ru@nginx.com>
parents:
617
diff
changeset
|
2954 Значение переменной появляется в location’ах, обрабатываемых |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2955 директивами |
1181 | 2956 <link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>, |
1194 | 2957 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>, |
2958 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_pass"/> | |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2959 и |
1181 | 2960 <link doc="ngx_http_scgi_module.xml" id="scgi_pass"/>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2961 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2962 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2963 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2964 <tag-name id="var_request_body_file"><var>$request_body_file</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2965 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2966 имя временного файла, в котором хранится тело запроса |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2967 <para> |
958
fd1f8e0a405e
Text review of ngx_http_core_module.
Egor Nikitin <yegor.nikitin@gmail.com>
parents:
948
diff
changeset
|
2968 По завершении обработки файл необходимо удалить. |
966 | 2969 Для того чтобы тело запроса всегда записывалось в файл, |
406
98dac2bd7598
Links with mixed underscores and spaces were hard to read, eliminated them.
Ruslan Ermilov <ru@nginx.com>
parents:
400
diff
changeset
|
2970 следует включить <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
|
2971 При передаче имени временного файла в проксированном запросе |
1194 | 2972 или в запросе к FastCGI/uwsgi/SCGI-серверу следует запретить передачу самого |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2973 тела директивами |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2974 <link doc="ngx_http_proxy_module.xml" id="proxy_pass_request_body"> |
1181 | 2975 proxy_pass_request_body off</link>, |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2976 <link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass_request_body"> |
1194 | 2977 fastcgi_pass_request_body off</link>, |
2978 <link doc="ngx_http_uwsgi_module.xml" id="uwsgi_pass_request_body"> | |
2979 uwsgi_pass_request_body off</link> | |
1181 | 2980 или |
2981 <link doc="ngx_http_scgi_module.xml" id="scgi_pass_request_body"> | |
2982 scgi_pass_request_body off</link> | |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2983 соответственно. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2984 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2985 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2986 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2987 <tag-name id="var_request_completion"><var>$request_completion</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2988 <tag-desc> |
271 | 2989 “<literal>OK</literal>” если запрос завершился, |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2990 либо пустая строка |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2991 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2992 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
2993 <tag-name id="var_request_filename"><var>$request_filename</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2994 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2995 путь к файлу для текущего запроса, формируемый из директив |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2996 <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
|
2997 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
2998 |
826
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
2999 <tag-name id="var_request_length"><var>$request_length</var></tag-name> |
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3000 <tag-desc> |
840
9dab69f2b71d
Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents:
835
diff
changeset
|
3001 длина запроса (включая строку запроса, заголовок и тело запроса) |
9dab69f2b71d
Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents:
835
diff
changeset
|
3002 (1.3.12, 1.2.7) |
826
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3003 </tag-desc> |
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3004 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3005 <tag-name id="var_request_method"><var>$request_method</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3006 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3007 метод запроса, обычно |
271 | 3008 “<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
|
3009 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3010 |
771
47ad88faaa3f
$msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents:
769
diff
changeset
|
3011 <tag-name id="var_request_time"><var>$request_time</var></tag-name> |
47ad88faaa3f
$msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents:
769
diff
changeset
|
3012 <tag-desc> |
779
32b8498cfb40
$msec and $request_time have become generic variables in 1.2.6.
Ruslan Ermilov <ru@nginx.com>
parents:
771
diff
changeset
|
3013 время обработки запроса в секундах с точностью до миллисекунд |
32b8498cfb40
$msec and $request_time have become generic variables in 1.2.6.
Ruslan Ermilov <ru@nginx.com>
parents:
771
diff
changeset
|
3014 (1.3.9, 1.2.6); |
771
47ad88faaa3f
$msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents:
769
diff
changeset
|
3015 время, прошедшее с момента чтения первых байт от клиента |
47ad88faaa3f
$msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents:
769
diff
changeset
|
3016 </tag-desc> |
47ad88faaa3f
$msec and $request_time have become generic variables in 1.3.9.
Ruslan Ermilov <ru@nginx.com>
parents:
769
diff
changeset
|
3017 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3018 <tag-name id="var_request_uri"><var>$request_uri</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3019 <tag-desc> |
431
0412333658fe
Consistent translation of "original".
Ruslan Ermilov <ru@nginx.com>
parents:
429
diff
changeset
|
3020 первоначальный URI запроса целиком (с аргументами) |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3021 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3022 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3023 <tag-name id="var_scheme"><var>$scheme</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3024 <tag-desc> |
271 | 3025 схема запроса, “<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
|
3026 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3027 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3028 <tag-name id="var_sent_http_"><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
|
3029 <tag-desc> |
448
92672f6f0ee1
Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents:
442
diff
changeset
|
3030 произвольное поле заголовка ответа; |
92672f6f0ee1
Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents:
442
diff
changeset
|
3031 последняя часть имени переменной соответствует имени поля, приведённому |
92672f6f0ee1
Elaborated on $http_* and $sent_http_* syntax.
Ruslan Ermilov <ru@nginx.com>
parents:
442
diff
changeset
|
3032 к нижнему регистру, с заменой символов тире на символы подчёркивания |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3033 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3034 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3035 <tag-name id="var_server_addr"><var>$server_addr</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3036 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3037 адрес сервера, принявшего запрос |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3038 <para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3039 Получение значения этой переменной обычно требует одного системного вызова. |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3040 Чтобы избежать системного вызова, в директивах <link id="listen"/> |
271 | 3041 следует указывать адреса и использовать параметр <literal>bind</literal>. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3042 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3043 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3044 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3045 <tag-name id="var_server_name"><var>$server_name</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3046 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3047 имя сервера, принявшего запрос |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3048 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3049 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3050 <tag-name id="var_server_port"><var>$server_port</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3051 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3052 порт сервера, принявшего запрос |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3053 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3054 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3055 <tag-name id="var_server_protocol"><var>$server_protocol</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3056 <tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3057 протокол сервера, обычно |
271 | 3058 “<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
|
3059 или |
271 | 3060 “<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
|
3061 </tag-desc> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3062 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3063 <tag-name id="var_status"><var>$status</var></tag-name> |
541
a8971cf346be
Documented the $status core variable.
Andrey Belov <defan@nginx.com>
parents:
537
diff
changeset
|
3064 <tag-desc> |
769
d71e56d56ada
Documented variables relocations between http log and core modules.
Vladimir Homutov <vl@nginx.com>
parents:
768
diff
changeset
|
3065 статус ответа (1.3.2, 1.2.2) |
541
a8971cf346be
Documented the $status core variable.
Andrey Belov <defan@nginx.com>
parents:
537
diff
changeset
|
3066 </tag-desc> |
a8971cf346be
Documented the $status core variable.
Andrey Belov <defan@nginx.com>
parents:
537
diff
changeset
|
3067 |
826
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3068 <tag-name id="var_time_iso8601"><var>$time_iso8601</var></tag-name> |
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3069 <tag-desc> |
840
9dab69f2b71d
Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents:
835
diff
changeset
|
3070 локальное время в формате по стандарту ISO 8601 (1.3.12, 1.2.7) |
826
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3071 </tag-desc> |
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3072 |
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3073 <tag-name id="var_time_local"><var>$time_local</var></tag-name> |
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3074 <tag-desc> |
840
9dab69f2b71d
Documented nginx 1.2.7 changes.
Ruslan Ermilov <ru@nginx.com>
parents:
835
diff
changeset
|
3075 локальное время в Common Log Format (1.3.12, 1.2.7) |
826
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3076 </tag-desc> |
ddd22f571529
Variables $pipe, $request_length, $time_iso8601, and $time_local.
Ruslan Ermilov <ru@nginx.com>
parents:
810
diff
changeset
|
3077 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3078 <tag-name id="var_tcpinfo_"> |
453
98ee97a382d3
Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
448
diff
changeset
|
3079 <var>$tcpinfo_rtt</var>, |
98ee97a382d3
Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
448
diff
changeset
|
3080 <var>$tcpinfo_rttvar</var>, |
98ee97a382d3
Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
448
diff
changeset
|
3081 <var>$tcpinfo_snd_cwnd</var>, |
98ee97a382d3
Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
448
diff
changeset
|
3082 <var>$tcpinfo_rcv_space</var> |
98ee97a382d3
Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
448
diff
changeset
|
3083 </tag-name> |
98ee97a382d3
Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
448
diff
changeset
|
3084 <tag-desc> |
98ee97a382d3
Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
448
diff
changeset
|
3085 информация о клиентском TCP-соединении; доступна на системах, |
617
368a449e85b8
Expanded documentation of what various parameters of the "listen"
Ruslan Ermilov <ru@nginx.com>
parents:
615
diff
changeset
|
3086 поддерживающих параметр сокета <c-def>TCP_INFO</c-def> |
453
98ee97a382d3
Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
448
diff
changeset
|
3087 </tag-desc> |
98ee97a382d3
Documented the $tcpinfo_* variables.
Ruslan Ermilov <ru@nginx.com>
parents:
448
diff
changeset
|
3088 |
768
f63b7fa3bf17
Added "id" attributes to http core module variables.
Vladimir Homutov <vl@nginx.com>
parents:
767
diff
changeset
|
3089 <tag-name id="var_uri"><var>$uri</var></tag-name> |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3090 <tag-desc> |
503
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
3091 текущий 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
|
3092 <para> |
503
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
3093 Значение <var>$uri</var> может изменяться в процессе обработки запроса, |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
3094 например, при внутренних перенаправлениях |
aed015c3dedd
Documented URI normalization rules, including %-decoding.
Ruslan Ermilov <ru@nginx.com>
parents:
499
diff
changeset
|
3095 или при использовании индексных файлов. |
253
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3096 </para> |
ff1e139a8c98
Bring the ngx_http_core_module documentation up to date.
Ruslan Ermilov <ru@nginx.com>
parents:
222
diff
changeset
|
3097 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3098 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3099 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3100 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3101 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3102 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3103 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3104 </module> |