Mercurial > hg > nginx-site
annotate xml/ru/docs/http/ngx_http_ssi_module.xml @ 911:a5e982a394df
Added "Contributing Changes" article.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 22 May 2013 18:42:33 +0400 |
parents | 7b28d6ae4539 |
children | 7afb12159c1d |
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:
546
diff
changeset
|
3 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
546
diff
changeset
|
4 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
546
diff
changeset
|
5 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
546
diff
changeset
|
6 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
546
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 |
398 | 10 <module name="Модуль ngx_http_ssi_module" |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
11 link="/ru/docs/http/ngx_http_ssi_module.html" |
589 | 12 lang="ru" |
726 | 13 rev="2"> |
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> |
398 | 18 Модуль <literal>ngx_http_ssi_module</literal> — это фильтр, |
19 обрабатывающий команды SSI (Server Side Includes) в проходящих | |
20 через него ответах. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
21 На данный момент список поддерживаемых команд SSI неполон. |
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 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
24 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
25 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
26 |
398 | 27 <section id="example" name="Пример конфигурации"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
28 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
29 <para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
30 <example> |
398 | 31 location / { |
32 ssi on; | |
33 ... | |
34 } | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
35 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
36 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
37 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
38 </section> |
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 |
398 | 41 <section id="directives" name="Директивы"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
42 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
43 <directive name="ssi"> |
271 | 44 <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:
76
diff
changeset
|
45 <default>off</default> |
398 | 46 <context>http</context> |
47 <context>server</context> | |
48 <context>location</context> | |
49 <context>if в location</context> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
50 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
51 <para> |
398 | 52 Разрешает или запрещает обработку команд SSI в ответах. |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
53 </para> |
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> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
56 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
57 |
725
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
58 <directive name="ssi_min_file_chunk"> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
59 <syntax><literal>размер</literal></syntax> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
60 <default>1k</default> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
61 <context>http</context> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
62 <context>server</context> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
63 <context>location</context> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
64 |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
65 <para> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
66 Задаёт минимальный <value>размер</value> частей ответа, хранящихся |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
67 на диске, начиная с которого имеет смысл посылать их с помощью |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
68 <link doc="ngx_http_core_module.xml" id="sendfile"/>. |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
69 </para> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
70 |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
71 </directive> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
72 |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
73 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
74 <directive name="ssi_silent_errors"> |
271 | 75 <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:
76
diff
changeset
|
76 <default>off</default> |
398 | 77 <context>http</context> |
78 <context>server</context> | |
79 <context>location</context> | |
76
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> |
398 | 82 Разрешает не выводить строку |
83 “<literal>[an error occurred while processing the directive]</literal>”, | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
84 если во время обработки SSI произошла ошибка. |
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 </directive> |
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 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
90 <directive name="ssi_types"> |
271 | 91 <syntax><value>mime-тип</value> ...</syntax> |
102
c76a257f3fd4
The directive name is now automatically printed in <default> and <syntax>.
Ruslan Ermilov <ru@nginx.com>
parents:
76
diff
changeset
|
92 <default>text/html</default> |
398 | 93 <context>http</context> |
94 <context>server</context> | |
95 <context>location</context> | |
76
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 <para> |
398 | 98 Разрешает обработку команд SSI в ответах с указанными MIME-типами |
99 в дополнение к “<literal>text/html</literal>”. | |
546
694db9597ee0
Documented the special value "*" in various "*_type" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
398
diff
changeset
|
100 Специальное значение “<literal>*</literal>” соответствует любому MIME-типу |
694db9597ee0
Documented the special value "*" in various "*_type" directives.
Ruslan Ermilov <ru@nginx.com>
parents:
398
diff
changeset
|
101 (0.8.29). |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
102 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
103 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
104 </directive> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
105 |
725
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
106 |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
107 <directive name="ssi_value_length"> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
108 <syntax><value>длина</value></syntax> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
109 <default>256</default> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
110 <context>http</context> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
111 <context>server</context> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
112 <context>location</context> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
113 |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
114 <para> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
115 Задаёт максимальную длину значений параметров в SSI-командах. |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
116 </para> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
117 |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
118 </directive> |
64085bf227f6
Documented 'min_file_chunk' and 'value_length' SSI module directives.
Vladimir Homutov <vl@nginx.com>
parents:
589
diff
changeset
|
119 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
120 </section> |
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 |
398 | 123 <section id="commands" name="Команды SSI"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
124 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
125 <para> |
398 | 126 Общий формат команд SSI такой: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
127 <example> |
398 | 128 <!--# команда параметр1=значение1 параметр2=значение2 ... --> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
129 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
130 </para> |
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 <para> |
398 | 133 Поддерживаются следующие команды: |
134 <list type="tag"> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
135 |
398 | 136 <tag-name><literal>block</literal></tag-name> |
137 <tag-desc> | |
138 Описывает блок, который можно использовать | |
139 как заглушку в команде <literal>include</literal>. | |
140 Внутри блока могут быть другие команды SSI. | |
141 Параметр команды: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
142 |
398 | 143 <list type="tag"> |
144 <tag-name><literal>name</literal></tag-name> | |
145 <tag-desc> | |
146 имя блока. | |
147 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
148 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
149 |
398 | 150 Пример: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
151 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
152 <!--# block name="one" --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
153 заглушка |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
154 <!--# endblock --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
155 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
156 |
398 | 157 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
158 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
159 |
398 | 160 <tag-name><literal>config</literal></tag-name> |
161 <tag-desc> | |
162 Задаёт некоторые параметры, используемые при обработке SSI, а именно: | |
163 | |
164 <list type="tag"> | |
165 <tag-name><literal>errmsg</literal></tag-name> | |
166 <tag-desc> | |
167 строка, выводящаяся при ошибке во время обработки SSI. | |
168 По умолчанию выводится такая строка: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
169 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
170 [an error occurred while processing the directive] |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
171 </example> |
398 | 172 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
173 |
398 | 174 <tag-name><literal>timefmt</literal></tag-name> |
175 <tag-desc> | |
176 строка формата, передаваемая функции <c-func>strftime</c-func> | |
177 для вывода даты и времени. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
178 По умолчанию используется такой формат: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
179 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
180 "%A, %d-%b-%Y %H:%M:%S %Z" |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
181 </example> |
398 | 182 Для вывода времени в секундах подходит формат |
183 “<literal>%s</literal>”. | |
184 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
185 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
186 |
398 | 187 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
188 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
189 |
398 | 190 <tag-name><literal>echo</literal></tag-name> |
191 <tag-desc> | |
192 Выводит значение переменной. | |
193 Параметры команды: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
194 |
398 | 195 <list type="tag"> |
196 <tag-name><literal>var</literal></tag-name> | |
197 <tag-desc> | |
198 имя переменной. | |
199 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
200 |
398 | 201 <tag-name><literal>encoding</literal></tag-name> |
202 <tag-desc> | |
203 способ кодирования. | |
204 Возможны три значения — <literal>none</literal>, <literal>url</literal> и | |
205 <literal>entity</literal>. | |
206 По умолчанию используется <literal>entity</literal>. | |
207 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
208 |
398 | 209 <tag-name><literal>default</literal></tag-name> |
210 <tag-desc> | |
211 нестандартный параметр, задающий строку, которая выводится, | |
212 если переменная не определена. | |
213 По умолчанию выводится строка | |
214 “<literal>none</literal>”. | |
215 Команда | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
216 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
217 <!--# echo var="name" default="<emphasis>нет</emphasis>" --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
218 </example> |
398 | 219 заменяет такую последовательность команд: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
220 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
221 <!--# if expr="$name" --><!--# echo var="name" --><!--# |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
222 else --><emphasis>нет</emphasis><!--# endif --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
223 </example> |
398 | 224 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
225 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
226 |
398 | 227 </tag-desc> |
76
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 |
398 | 230 <tag-name><literal>if</literal></tag-name> |
231 <tag-desc> | |
232 Выполняет условное включение. | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
233 Поддерживаются следующие команды: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
234 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
235 <!--# if expr="..." --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
236 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
237 <!--# elif expr="..." --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
238 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
239 <!--# else --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
240 ... |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
241 <!--# endif --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
242 </example> |
398 | 243 На данный момент поддерживается только один уровень вложенности. |
244 Параметр команды: | |
245 | |
246 <list type="tag"> | |
247 <tag-name><literal>expr</literal></tag-name> | |
248 <tag-desc> | |
249 выражение. | |
250 В выражении может быть: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
251 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
252 <list type="bullet"> |
398 | 253 |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
254 <listitem> |
398 | 255 проверка существования переменной: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
256 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
257 <!--# if expr="$name" --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
258 </example> |
398 | 259 </listitem> |
260 | |
261 <listitem> | |
76
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 <example> |
398 | 264 <!--# if expr="$name = <value>text</value>" --> |
265 <!--# if expr="$name != <value>text</value>" --> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
266 </example> |
398 | 267 </listitem> |
268 | |
269 <listitem> | |
270 сравнение переменной с регулярным выражением: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
271 <example> |
398 | 272 <!--# if expr="$name = /<value>text</value>/" --> |
273 <!--# if expr="$name != /<value>text</value>/" --> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
274 </example> |
398 | 275 </listitem> |
276 </list> | |
277 | |
278 Если в <value>text</value> встречаются переменные, | |
279 то производится подстановка их значений. | |
290
15f81ed48a43
Documented regex captures in the "if" SSI command.
Valentin Bartenev <vbart@nginx.com>
parents:
285
diff
changeset
|
280 В регулярном выражении можно задать позиционные и именованные выделения, |
398 | 281 а затем использовать их через переменные, например: |
290
15f81ed48a43
Documented regex captures in the "if" SSI command.
Valentin Bartenev <vbart@nginx.com>
parents:
285
diff
changeset
|
282 <example> |
15f81ed48a43
Documented regex captures in the "if" SSI command.
Valentin Bartenev <vbart@nginx.com>
parents:
285
diff
changeset
|
283 <!--# if expr="$name = /(.+)@(?P<domain>.+)/" --> |
15f81ed48a43
Documented regex captures in the "if" SSI command.
Valentin Bartenev <vbart@nginx.com>
parents:
285
diff
changeset
|
284 <!--# echo var="1" --> |
15f81ed48a43
Documented regex captures in the "if" SSI command.
Valentin Bartenev <vbart@nginx.com>
parents:
285
diff
changeset
|
285 <!--# echo var="domain" --> |
15f81ed48a43
Documented regex captures in the "if" SSI command.
Valentin Bartenev <vbart@nginx.com>
parents:
285
diff
changeset
|
286 <!--# endif --> |
15f81ed48a43
Documented regex captures in the "if" SSI command.
Valentin Bartenev <vbart@nginx.com>
parents:
285
diff
changeset
|
287 </example> |
398 | 288 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
289 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
290 |
398 | 291 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
292 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
293 |
398 | 294 <tag-name><literal>include</literal></tag-name> |
295 <tag-desc> | |
296 Включает в ответ результат другого запроса. | |
297 Параметры команды: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
298 |
398 | 299 <list type="tag"> |
300 <tag-name><literal>file</literal></tag-name> | |
301 <tag-desc> | |
302 задаёт включаемый файл, например: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
303 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
304 <!--# include file="footer.html" --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
305 </example> |
398 | 306 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
307 |
398 | 308 <tag-name><literal>virtual</literal></tag-name> |
309 <tag-desc> | |
310 задаёт включаемый запрос, например: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
311 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
312 <!--# include virtual="/remote/body.php?argument=value" --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
313 </example> |
398 | 314 Несколько запросов, указанных на одной странице и обрабатываемых |
315 проксируемыми или FastCGI-серверами, работают параллельно. | |
316 Если нужна последовательная обработка, следует воспользоваться параметром | |
317 <literal>wait</literal>. | |
318 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
319 |
398 | 320 <tag-name><literal>stub</literal></tag-name> |
321 <tag-desc> | |
322 нестандартный параметр, задающий имя блока, | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
323 содержимое которого будет выведено, если тело ответа на включаемый запрос |
398 | 324 пустое или если при исполнении запроса произошла ошибка, например: |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
325 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
326 <!--# block name="one" -->&nbsp;<!--# endblock --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
327 <!--# include virtual="/remote/body.php?argument=value" stub="one" --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
328 </example> |
398 | 329 Содержимое замещающего блока обрабатывается в контексте включаемого запроса. |
330 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
331 |
398 | 332 <tag-name><literal>wait</literal></tag-name> |
333 <tag-desc> | |
334 нестандартный параметр, указывающий, нужно ли ждать | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
335 полного исполнения данного запроса, прежде чем продолжать выполнение |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
336 SSI, например: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
337 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
338 <!--# include virtual="/remote/body.php?argument=value" wait="yes" --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
339 </example> |
398 | 340 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
341 |
398 | 342 <tag-name><literal>set</literal></tag-name> |
343 <tag-desc> | |
344 нестандартный параметр, указывающий, что удачный | |
76
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 например: |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
347 <example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
348 <!--# include virtual="/remote/body.php?argument=value" set="one" --> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
349 </example> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
350 Необходимо учитывать, что в переменные можно записать только результаты |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
351 ответов, полученные через модули |
398 | 352 <link doc="ngx_http_proxy_module.xml">ngx_http_proxy_module</link> и |
353 <link doc="ngx_http_memcached_module.xml">ngx_http_memcached_module</link>. | |
354 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
355 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
356 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
357 |
398 | 358 </tag-desc> |
359 | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
360 |
398 | 361 <tag-name><literal>set</literal></tag-name> |
362 <tag-desc> | |
363 Присваивает значение переменной. | |
364 Параметры команды: | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
365 |
398 | 366 <list type="tag"> |
367 <tag-name><literal>var</literal></tag-name> | |
368 <tag-desc> | |
369 имя переменной. | |
370 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
371 |
398 | 372 <tag-name><literal>value</literal></tag-name> |
373 <tag-desc> | |
374 значение переменной. | |
375 Если в присваиваемом значении есть переменные, | |
376 то производится подстановка их значений. | |
377 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
378 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
379 |
398 | 380 </tag-desc> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
381 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
382 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
383 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
384 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
385 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
386 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
387 |
398 | 388 <section id="variables" name="Встроенные переменные"> |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
389 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
390 <para> |
398 | 391 Модуль <literal>ngx_http_ssi_module</literal> поддерживает |
392 две встроенные переменные: | |
393 <list type="tag"> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
394 |
398 | 395 <tag-name><var>$date_local</var></tag-name> |
396 <tag-desc> | |
397 текущее время в локальной временной зоне. | |
398 Формат задаётся командой <literal>config</literal> | |
399 с параметром <literal>timefmt</literal>. | |
400 </tag-desc> | |
76
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
401 |
398 | 402 <tag-name><var>$date_gmt</var></tag-name> |
403 <tag-desc> | |
404 текущее время в GMT. | |
405 Формат задаётся командой <literal>config</literal> | |
406 с параметром <literal>timefmt</literal>. | |
407 </tag-desc> | |
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 </list> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
410 </para> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
411 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
412 </section> |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
413 |
4a4caa566120
Russian documentation import.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff
changeset
|
414 </module> |