Mercurial > hg > nginx-site
comparison xml/ru/docs/http/ngx_http_sub_module.xml @ 76:4a4caa566120
Russian documentation import.
Changes in module.dtd: <example> now allowed to contain <value> and
<emphasis> elements (we need this to show important parts in examples),
less strict checking of <directive> syntax (we don't want to fully
document some directives, notably deprecated ones).
Known issues:
1. <syntax> elements are preserved as is, they will require manual conversion
(likely to some not-yet-existed format a la DocBook cmdsynopsis, as
currently used one seems to be incomplete);
2. <value> no longer corresponds to replaceable content, and it's use in
examples isn't correct;
3. <link doc="document#fragment"> doesn't work with current xslt, either
should be supported or changed to <link doc="document" id="fragment">.
The following files are intentionally omitted: maillists.xml (support.xml
should be used instead), experimental.xml (obsolete), faq.xml (conflicts
with existing one, needs discussion).
Not yet linked to site.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 11 Oct 2011 12:57:50 +0000 |
parents | |
children | 1d315ef37215 |
comparison
equal
deleted
inserted
replaced
75:2bf4cd2787c5 | 76:4a4caa566120 |
---|---|
1 <?xml version="1.0" encoding="utf-8"?> | |
2 | |
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | |
4 | |
5 <module name="Директивы модуля ngx_http_sub_module" | |
6 link="/ru/docs/http/ngx_http_sub_module.html" | |
7 lang="ru"> | |
8 | |
9 <section name="" id="summary"> | |
10 | |
11 <para> | |
12 Модуль ngx_http_sub_module — это фильтр, | |
13 изменяющий в ответе одну заданную строку на другую. | |
14 По умолчанию модуль не собирается, нужно разрешить его сборку | |
15 при конфигурировании параметром <command>--with-http_sub_module</command>. | |
16 </para> | |
17 | |
18 </section> | |
19 | |
20 | |
21 <section name="Пример конфигурации" id="example"> | |
22 | |
23 <para> | |
24 <example> | |
25 location / { | |
26 sub_filter </head> | |
27 '</head><script language="javascript" src="$script"></script>'; | |
28 sub_filter_once on; | |
29 } | |
30 </example> | |
31 </para> | |
32 | |
33 </section> | |
34 | |
35 | |
36 <section name="Директивы" id="directives"> | |
37 | |
38 <directive name="sub_filter"> | |
39 <syntax>sub_filter <value>строка замена</value></syntax> | |
40 <default>нет</default> | |
41 <context>http, server, location</context> | |
42 | |
43 <para> | |
44 Директива задаёт строку, которую нужно заменить, и строку замены. | |
45 Заменяемая строка проверяется без учёта регистра. | |
46 В строке замены можно использовать переменные. | |
47 </para> | |
48 | |
49 </directive> | |
50 | |
51 | |
52 <directive name="sub_filter_once"> | |
53 <syntax>sub_filter_once <value>on|off</value></syntax> | |
54 <default>sub_filter_once on</default> | |
55 <context>http, server, location</context> | |
56 | |
57 <para> | |
58 Директива определяет, сколько раз нужно искать заменяемую строку — один | |
59 раз или несколько. | |
60 </para> | |
61 | |
62 </directive> | |
63 | |
64 | |
65 <directive name="sub_filter_types"> | |
66 <syntax>sub_filter_types <value>mime-тип [mime-тип ...]</value></syntax> | |
67 <default>sub_filter_types text/html</default> | |
68 <context>http, server, location</context> | |
69 | |
70 <para> | |
71 Директива разрешает замену строк в ответах с указанными MIME-типами | |
72 в дополнение к "text/html". | |
73 </para> | |
74 | |
75 </directive> | |
76 | |
77 </section> | |
78 | |
79 </module> |