Mercurial > hg > nginx-site
comparison xml/en/docs/http/ngx_http_sub_module.xml @ 348:5a848934a12d
English translation of ngx_http_geoip_module, ngx_http_map_module,
ngx_http_realip_module, ngx_http_secure_link_module,
ngx_http_split_clients_module, and ngx_http_sub_module.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Mon, 23 Jan 2012 16:50:35 +0000 |
parents | |
children | 694db9597ee0 |
comparison
equal
deleted
inserted
replaced
347:daae2b619815 | 348:5a848934a12d |
---|---|
1 <?xml version="1.0"?> | |
2 | |
3 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd"> | |
4 | |
5 <module name="Module ngx_http_sub_module" | |
6 link="/en/docs/http/ngx_http_sub_module.html" | |
7 lang="en"> | |
8 | |
9 <section id="summary"> | |
10 | |
11 <para> | |
12 The <literal>ngx_http_sub_module</literal> module is a filter | |
13 that modifies a response by replacing one specified string by another. | |
14 </para> | |
15 | |
16 <para> | |
17 This module is not built by default, it should be enabled with the | |
18 <literal>--with-http_sub_module</literal> | |
19 configuration parameter. | |
20 </para> | |
21 | |
22 </section> | |
23 | |
24 | |
25 <section id="example" name="Example Configuration"> | |
26 | |
27 <para> | |
28 <example> | |
29 location / { | |
30 sub_filter </head> | |
31 '</head><script language="javascript" src="$script"></script>'; | |
32 sub_filter_once on; | |
33 } | |
34 </example> | |
35 </para> | |
36 | |
37 </section> | |
38 | |
39 | |
40 <section id="directives" name="Directives"> | |
41 | |
42 <directive name="sub_filter"> | |
43 <syntax><value>string</value> <value>replacement</value></syntax> | |
44 <default/> | |
45 <context>http</context> | |
46 <context>server</context> | |
47 <context>location</context> | |
48 | |
49 <para> | |
50 Sets a string that needs to be changed, and a replacement string. | |
51 The string to be replaced is matched ignoring the case. | |
52 A replacement string can contain variables. | |
53 </para> | |
54 | |
55 </directive> | |
56 | |
57 | |
58 <directive name="sub_filter_once"> | |
59 <syntax><literal>on</literal> | <literal>off</literal></syntax> | |
60 <default>on</default> | |
61 <context>http</context> | |
62 <context>server</context> | |
63 <context>location</context> | |
64 | |
65 <para> | |
66 Determines how many times to look for a string to be replaced, | |
67 once or several times. | |
68 </para> | |
69 | |
70 </directive> | |
71 | |
72 | |
73 <directive name="sub_filter_types"> | |
74 <syntax><value>mime-type</value> ...</syntax> | |
75 <default>text/html</default> | |
76 <context>http</context> | |
77 <context>server</context> | |
78 <context>location</context> | |
79 | |
80 <para> | |
81 Enables string replacement in responses with the specified MIME types | |
82 in addition to “<literal>text/html</literal>”. | |
83 </para> | |
84 | |
85 </directive> | |
86 | |
87 </section> | |
88 | |
89 </module> |