Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_headers_module.xml @ 381:8ad9df891e23
Fixed grammar.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 30 Jan 2012 19:34:03 +0000 |
parents | bb51d3e17dd0 |
children | d4464d7bff6c |
rev | line source |
---|---|
222
bfe3eff81d04
Removed redundant encoding specification.
Ruslan Ermilov <ru@nginx.com>
parents:
110
diff
changeset
|
1 <?xml version="1.0"?> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
2 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
4 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
5 <module name="Модуль ngx_http_headers_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
6 link="/ru/docs/http/ngx_http_headers_module.html" |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
7 lang="ru"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
8 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
9 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
10 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
12 Модуль <literal>ngx_http_headers_module</literal> позволяет выдавать |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
13 поля заголовка <header>Expires</header> и <header>Cache-Control</header>, |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
14 а также добавлять произвольные поля в заголовок ответа. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
15 </para> |
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 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
18 |
364 | 19 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
20 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
23 <example> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
24 expires 24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
25 expires modified +24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
26 expires @24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
27 expires 0; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
28 expires -1; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
29 expires epoch; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
30 add_header Cache-Control private; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
31 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
32 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
33 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
34 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
36 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
37 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
39 <directive name="add_header"> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
40 <syntax><value>имя</value> <value>значение</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
41 <default/> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
42 <context>http</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
43 <context>server</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
44 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
45 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
46 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
47 Добавляет указанное поле в заголовок ответа при условии, что код ответа |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
48 равен 200, 204, 301, 302 или 304. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
49 В значении можно использовать переменные. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
52 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
54 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
55 <directive name="expires"> |
271 | 56 <syntax>[<literal>modified</literal>] <value>время</value></syntax> |
57 <syntax> | |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
58 <literal>epoch</literal> | |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
59 <literal>max</literal> | |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
60 <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
|
61 <default>off</default> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
62 <context>http</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
63 <context>server</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
64 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
65 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
66 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
67 Разрешает или запрещает добавлять или менять поля <header>Expires</header> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
68 и <header>Cache-Control</header> в заголовке ответа. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
69 В качестве параметра можно задать положительное или отрицательное |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
70 <link doc="../syntax.xml">время</link>. |
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> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
74 Время в поле <header>Expires</header> получается как сумма текущего времени |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
75 и времени, заданного в директиве. |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
76 Если используется параметр <literal>modified</literal> (0.7.0, 0.6.32), |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
77 то время получается как сумма |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
78 времени модификации файла и времени, заданного в директиве. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
79 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
80 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
81 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
82 Кроме того, с помощью префикса “<literal>@</literal>” можно задать |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
83 время суток (0.7.9, 0.6.34): |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 <example> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
85 expires @15h30m; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
86 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
87 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
88 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
89 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
90 Параметр <literal>epoch</literal> соответствует абсолютному времени |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
91 “<literal>Thu, 01 Jan 1970 00:00:01 GMT</literal>” |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
92 (1 января 1970 года 00:00:01 GMT). |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
93 Содержимое поля <header>Cache-Control</header> зависит от знака |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
94 заданного времени: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
95 <list type="bullet"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
96 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
97 <listitem> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
98 отрицательное время — <header>Cache-Control: no-cache</header>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
99 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
100 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
101 <listitem> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
102 положительное или равное нулю время — |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
103 <header>Cache-Control: max-age=<value>t</value></header>, |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
104 где <value>t</value> это время в секундах, заданное в директиве. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
105 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
106 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
107 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
108 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
109 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
110 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
111 Параметр <literal>max</literal> задаёт время |
364 | 112 “<literal>Thu, 31 Dec 2037 23:55:55 GMT</literal>” |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
113 (31 декабря 2037 23:55:55 GMT) для поля <header>Expires</header> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
114 и 10 лет для поля <header>Cache-Control</header>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
115 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
116 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
117 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
118 Параметр <literal>off</literal> запрещает добавлять или менять поля |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
119 <header>Expires</header> и <header>Cache-Control</header> в заголовке ответа. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
120 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
121 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
122 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
123 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
124 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
125 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
126 </module> |