annotate xml/en/docs/http/ngx_http_sub_module.xml @ 1878:127ae107e5a9

Removed clause about shared memory and Windows versions with ASLR. Starting with nginx 1.9.0 shared memory can be used on Windows versions with address space layout randomization.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 26 Dec 2016 19:38:06 +0300
parents dc1e51247404
children eeed494bba51
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
1 <?xml version="1.0"?>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
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
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8 <!DOCTYPE module SYSTEM "../../../../dtd/module.dtd">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
10 <module name="Module ngx_http_sub_module"
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
11 link="/en/docs/http/ngx_http_sub_module.html"
589
764fbac1b8b4 Added document revision.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
12 lang="en"
1807
dc1e51247404 Described inheritance model for sub_filter.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1555
diff changeset
13 rev="5">
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
14
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
15 <section id="summary">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
16
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
17 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
18 The <literal>ngx_http_sub_module</literal> module is a filter
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
19 that modifies a response by replacing one specified string by another.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
20 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
21
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
22 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
23 This module is not built by default, it should be enabled with the
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
24 <literal>--with-http_sub_module</literal>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
25 configuration parameter.
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
26 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
27
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
28 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
29
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
30
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
31 <section id="example" name="Example Configuration">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
32
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
33 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
34 <example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
35 location / {
1555
2a79b38f640b Sub filter: documented support of multiple strings to replace.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1554
diff changeset
36 sub_filter '&lt;a href="http://127.0.0.1:8080/' '&lt;a href="https://$host/';
2a79b38f640b Sub filter: documented support of multiple strings to replace.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1554
diff changeset
37 sub_filter '&lt;img src="http://127.0.0.1:8080/' '&lt;img src="https://$host/';
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
38 sub_filter_once on;
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
39 }
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 </example>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
41 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
42
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
43 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
44
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
45
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
46 <section id="directives" name="Directives">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
47
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
48 <directive name="sub_filter">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
49 <syntax><value>string</value> <value>replacement</value></syntax>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
50 <default/>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
51 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
52 <context>server</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
53 <context>location</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
54
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
55 <para>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 918
diff changeset
56 Sets a string to replace and a replacement string.
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 918
diff changeset
57 The string to replace is matched ignoring the case.
1554
80aba0439f7d Sub filter: documented variables support in strings to replace.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 966
diff changeset
58 The string to replace (1.9.4) and replacement string can contain variables.
1555
2a79b38f640b Sub filter: documented support of multiple strings to replace.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1554
diff changeset
59 Several <literal>sub_filter</literal> directives
2a79b38f640b Sub filter: documented support of multiple strings to replace.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1554
diff changeset
60 can be specified on one configuration level (1.9.4).
1807
dc1e51247404 Described inheritance model for sub_filter.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1555
diff changeset
61 These directives are inherited from the previous level if and only if there are
dc1e51247404 Described inheritance model for sub_filter.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1555
diff changeset
62 no <literal>sub_filter</literal> directives defined on the current level.
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
63 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
64
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
65 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
66
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
67
918
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
68 <directive name="sub_filter_last_modified">
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
69 <syntax><literal>on</literal> | <literal>off</literal></syntax>
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
70 <default>off</default>
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
71 <context>http</context>
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
72 <context>server</context>
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
73 <context>location</context>
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
74 <appeared-in>1.5.1</appeared-in>
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
75
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
76 <para>
966
95c3c3bbf1ce Text review.
Egor Nikitin <yegor.nikitin@gmail.com>
parents: 918
diff changeset
77 Allows preserving the <header>Last-Modified</header> header field
918
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
78 from the original response during replacement
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
79 to facilitate response caching.
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
80 </para>
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
81
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
82 <para>
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
83 By default, the header field is removed as contents of the response
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
84 are modified during processing.
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
85 </para>
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
86
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
87 </directive>
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
88
ae785c6aaa91 Documented ssi/sub_filter/xslt_last_modified.
Maxim Dounin <mdounin@mdounin.ru>
parents: 589
diff changeset
89
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
90 <directive name="sub_filter_once">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
91 <syntax><literal>on</literal> | <literal>off</literal></syntax>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
92 <default>on</default>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
93 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
94 <context>server</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
95 <context>location</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
96
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
97 <para>
1555
2a79b38f640b Sub filter: documented support of multiple strings to replace.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1554
diff changeset
98 Indicates whether to look for each string to replace
2a79b38f640b Sub filter: documented support of multiple strings to replace.
Yaroslav Zhuravlev <yar@nginx.com>
parents: 1554
diff changeset
99 once or repeatedly.
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
100 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
101
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
102 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
103
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
104
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
105 <directive name="sub_filter_types">
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
106 <syntax><value>mime-type</value> ...</syntax>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
107 <default>text/html</default>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
108 <context>http</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
109 <context>server</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
110 <context>location</context>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
111
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
112 <para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
113 Enables string replacement in responses with the specified MIME types
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
114 in addition to “<literal>text/html</literal>”.
546
694db9597ee0 Documented the special value "*" in various "*_type" directives.
Ruslan Ermilov <ru@nginx.com>
parents: 348
diff changeset
115 The special value “<literal>*</literal>” matches any MIME type (0.8.29).
348
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
116 </para>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
117
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
118 </directive>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
119
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
120 </section>
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
121
5a848934a12d English translation of ngx_http_geoip_module, ngx_http_map_module,
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
122 </module>