Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_headers_module.xml @ 619:625b592698b6
Updated with Netcraft August 2012 Web Server Survey stats.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Mon, 06 Aug 2012 11:18:39 +0000 |
parents | 764fbac1b8b4 |
children | f368bff5c70a |
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 |
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
427
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
427
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
427
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
427
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
427
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 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
10 <module name="Модуль ngx_http_headers_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 link="/ru/docs/http/ngx_http_headers_module.html" |
589 | 12 lang="ru" |
13 rev="1"> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
14 |
110
40eec261c2a6
Added proper support for anonymous sections, notably for the summary.
Ruslan Ermilov <ru@nginx.com>
parents:
102
diff
changeset
|
15 <section id="summary"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
16 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
17 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
18 Модуль <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
|
19 поля заголовка <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
|
20 а также добавлять произвольные поля в заголовок ответа. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
22 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
23 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
24 |
364 | 25 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
26 <section id="example" name="Пример конфигурации"> |
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> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 <example> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
30 expires 24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
31 expires modified +24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
32 expires @24h; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
33 expires 0; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
34 expires -1; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
35 expires epoch; |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
36 add_header Cache-Control private; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
37 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
39 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
40 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
41 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
42 |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
43 <section id="directives" name="Директивы"> |
76
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 <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
|
46 <syntax><value>имя</value> <value>значение</value></syntax> |
99
1d315ef37215
The case <default/> is now language-agnostic.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
47 <default/> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
48 <context>http</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
49 <context>server</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
50 <context>location</context> |
76
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 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
53 Добавляет указанное поле в заголовок ответа при условии, что код ответа |
427
d4464d7bff6c
Bring the list of response codes acceptable by ngx_http_headers_module
Ruslan Ermilov <ru@nginx.com>
parents:
364
diff
changeset
|
54 равен 200, 204, 206, 301, 302, 303, 304 или 307. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
55 В значении можно использовать переменные. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
56 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
57 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
58 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
59 |
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 <directive name="expires"> |
271 | 62 <syntax>[<literal>modified</literal>] <value>время</value></syntax> |
63 <syntax> | |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
64 <literal>epoch</literal> | |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
65 <literal>max</literal> | |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
66 <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
|
67 <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
|
68 <context>http</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
69 <context>server</context> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
70 <context>location</context> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
71 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
72 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
73 Разрешает или запрещает добавлять или менять поля <header>Expires</header> |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
74 и <header>Cache-Control</header> в заголовке ответа. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
75 В качестве параметра можно задать положительное или отрицательное |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
76 <link doc="../syntax.xml">время</link>. |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
77 </para> |
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> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
80 Время в поле <header>Expires</header> получается как сумма текущего времени |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
81 и времени, заданного в директиве. |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
82 Если используется параметр <literal>modified</literal> (0.7.0, 0.6.32), |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
83 то время получается как сумма |
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> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
86 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
87 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
88 Кроме того, с помощью префикса “<literal>@</literal>” можно задать |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
89 время суток (0.7.9, 0.6.34): |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
90 <example> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
91 expires @15h30m; |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
92 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
93 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
94 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
95 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
96 Параметр <literal>epoch</literal> соответствует абсолютному времени |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
97 “<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
|
98 (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
|
99 Содержимое поля <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
|
100 заданного времени: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
101 <list type="bullet"> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
102 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
103 <listitem> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
104 отрицательное время — <header>Cache-Control: no-cache</header>. |
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 <listitem> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
108 положительное или равное нулю время — |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
109 <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
|
110 где <value>t</value> это время в секундах, заданное в директиве. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
111 </listitem> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
112 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
113 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
114 </para> |
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 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
117 Параметр <literal>max</literal> задаёт время |
364 | 118 “<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
|
119 (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
|
120 и 10 лет для поля <header>Cache-Control</header>. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
121 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
122 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
123 <para> |
353
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
124 Параметр <literal>off</literal> запрещает добавлять или менять поля |
7b6155ac373b
Revised the Russian version of ngx_http_headers_module and translated
Ruslan Ermilov <ru@nginx.com>
parents:
271
diff
changeset
|
125 <header>Expires</header> и <header>Cache-Control</header> в заголовке ответа. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
126 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
127 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
128 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
129 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
130 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
131 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
132 </module> |