~ubuntu-branches/ubuntu/wily/nginx/wily-proposed

« back to all changes in this revision

Viewing changes to debian/modules/ngx_http_substitutions_filter_module/doc/README.html

  • Committer: Package Import Robot
  • Author(s): Dmitry Shachnev
  • Date: 2013-05-11 14:47:53 UTC
  • mfrom: (4.3.1 sid)
  • Revision ID: package-import@ubuntu.com-20130511144753-a65vqwrxy58omej4
Tags: 1.4.1-1ubuntu1
* Merge with Debian unstable (LP: #1177919). Remaining changes:
  - debian/conf/sites-available/default:
    + Modify default site configuration file to correct a typo
      that prevented out-of-the-box usability (LP: #1162177).
  - debian/patches/ubuntu-branding.patch:
    + Add ubuntu branding to server_tokens.
* Refresh all patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" ?>
 
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 
3
<html xmlns="http://www.w3.org/1999/xhtml">
 
4
<head>
 
5
<title>nginx_substitutions_filter</title>
 
6
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
 
7
<link rev="made" href="mailto:root@localhost" />
 
8
</head>
 
9
 
 
10
<body style="background-color: white">
 
11
 
 
12
<p><a name="__index__"></a></p>
 
13
<!-- INDEX BEGIN -->
 
14
 
 
15
<ul>
 
16
 
 
17
        <li><a href="#nginx_substitutions_filter">nginx_substitutions_filter</a></li>
 
18
        <ul>
 
19
 
 
20
                <li><a href="#description">Description</a></li>
 
21
                <li><a href="#example">Example</a></li>
 
22
                <li><a href="#directives">Directives</a></li>
 
23
                <ul>
 
24
 
 
25
                        <li><a href="#subs_filter_types">subs_filter_types</a></li>
 
26
                        <li><a href="#subs_filter">subs_filter</a></li>
 
27
                </ul>
 
28
 
 
29
                <li><a href="#installation">Installation</a></li>
 
30
                <li><a href="#known_issue">Known issue</a></li>
 
31
                <li><a href="#changes">CHANGES</a></li>
 
32
                <li><a href="#reporting_a_bug">Reporting a bug</a></li>
 
33
        </ul>
 
34
 
 
35
</ul>
 
36
<!-- INDEX END -->
 
37
 
 
38
<hr />
 
39
<p>
 
40
</p>
 
41
<h1><a name="nginx_substitutions_filter">nginx_substitutions_filter</a></h1>
 
42
<p><em>Note: this module is not distributed with the Nginx source. Installation instructions can be found <a href="#installation">below</a>. </em>&gt;</p>
 
43
<p>
 
44
</p>
 
45
<h2><a name="description">Description</a></h2>
 
46
<p><strong>nginx_substitutions_filter</strong> is a filter module which can do both regular expression and fixed string substitutions on response bodies. This module is quite different from the Nginx's native Substitution Module. It scans the output chains buffer and matches string line by line, just like Apache's mod_substitute (<a href="http://httpd.apache.org/docs/trunk/mod/mod_substitute.html">http://httpd.apache.org/docs/trunk/mod/mod_substitute.html</a>).</p>
 
47
<p>
 
48
</p>
 
49
<h2><a name="example">Example</a></h2>
 
50
<p>location / {</p>
 
51
<pre>
 
52
    subs_filter_types text/html text/css text/xml;
 
53
    subs_filter st(\d*).example.com $1.example.com ir;
 
54
    subs_filter a.example.com s.example.com;</pre>
 
55
<p>}</p>
 
56
<p>
 
57
</p>
 
58
<h2><a name="directives">Directives</a></h2>
 
59
<ul>
 
60
<li>
 
61
<p><a href="#subs_filter_types">subs_filter_types</a></p>
 
62
</li>
 
63
<li>
 
64
<p><a href="#subs_filter">subs_filter</a></p>
 
65
</li>
 
66
</ul>
 
67
<p>
 
68
</p>
 
69
<h3><a name="subs_filter_types">subs_filter_types</a></h3>
 
70
<p><strong>syntax:</strong> <em>subs_filter_types mime-type [mime-types] </em></p>
 
71
<p><strong>default:</strong> <em>subs_filter_types text/html</em></p>
 
72
<p><strong>context:</strong> <em>http, server, location</em></p>
 
73
<p><em>subs_filter_types</em> is used to specify which content types should be checked for <em>subs_filter</em>. The default is only <em>text/html</em>.</p>
 
74
<p>This module just works with plain text. If the response is compressed, it can't uncompress the response and will ignore this response. This module can be compatible with gzip filter module. But it will not work with proxy compressed response. You can disable the compressed response like this:</p>
 
75
<p>proxy_set_header Accept-Encoding ``'';</p>
 
76
<p>
 
77
</p>
 
78
<h3><a name="subs_filter">subs_filter</a></h3>
 
79
<p><strong>syntax:</strong> <em>subs_filter source_str destination_str [gior] </em></p>
 
80
<p><strong>default:</strong> <em>none</em></p>
 
81
<p><strong>context:</strong> <em>http, server, location</em></p>
 
82
<p><em>subs_filter</em> allows replacing source string(regular expression or fixed) in the nginx response with destination string. Substitution text may contain variables. More than one substitution rules per location is supported. The meaning of the third flags are:</p>
 
83
<ul>
 
84
<li>
 
85
<p><em>g</em>(default): Replace all the match strings.</p>
 
86
</li>
 
87
<li>
 
88
<p><em>i</em>: Perform a case-insensitive match.</p>
 
89
</li>
 
90
<li>
 
91
<p><em>o</em>: Just replace the first one.</p>
 
92
</li>
 
93
<li>
 
94
<p><em>r</em>: The pattern is treated as a regular expression, default is fixed string.</p>
 
95
</li>
 
96
</ul>
 
97
<p>
 
98
</p>
 
99
<h2><a name="installation">Installation</a></h2>
 
100
<p>To install, get the source with subversion:</p>
 
101
<p>git clone <a href="git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git">git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git</a></p>
 
102
<p>and then compile nginx with the following option:</p>
 
103
<p>./configure --add-module=/path/to/module</p>
 
104
<p>
 
105
</p>
 
106
<h2><a name="known_issue">Known issue</a></h2>
 
107
<p>*</p>
 
108
<p>
 
109
</p>
 
110
<h2><a name="changes">CHANGES</a></h2>
 
111
<p>Changes with nginx_substitutions_filter 0.6.0                                     2012-06-30</p>
 
112
<ul>
 
113
<li>
 
114
<p>refactor this module</p>
 
115
</li>
 
116
</ul>
 
117
<p>Changes with nginx_substitutions_filter 0.5.2                                     2010-08-11</p>
 
118
<ul>
 
119
<li>
 
120
<p>do many optimizing for this module</p>
 
121
</li>
 
122
<li>
 
123
<p>fix a bug of buffer overlap</p>
 
124
</li>
 
125
<li>
 
126
<p>fix a segment fault bug when output chain return NGX_AGAIN.</p>
 
127
</li>
 
128
<li>
 
129
<p>fix a bug about last buffer with no linefeed. This may cause segment fault. Thanks for Josef Fröhle</p>
 
130
</li>
 
131
</ul>
 
132
<p>Changes with nginx_substitutions_filter 0.5                                       2010-04-15</p>
 
133
<ul>
 
134
<li>
 
135
<p>refactor the source structure, create branches of dev</p>
 
136
</li>
 
137
<li>
 
138
<p>fix a bug of small chunk of buffers causing lose content</p>
 
139
</li>
 
140
<li>
 
141
<p>fix the bug of last_buf and the nginx's compatibility above 0.8.25</p>
 
142
</li>
 
143
<li>
 
144
<p>fix a bug with unwanted capture config error in fix string substitution</p>
 
145
</li>
 
146
<li>
 
147
<p>add feature of regex captures</p>
 
148
</li>
 
149
</ul>
 
150
<p>Changes with nginx_substitutions_filter 0.4                                       2009-12-23</p>
 
151
<ul>
 
152
<li>
 
153
<p>fix many bugs</p>
 
154
</li>
 
155
</ul>
 
156
<p>Changes with nginx_substitutions_filter 0.3                                       2009-02-04</p>
 
157
<ul>
 
158
<li>
 
159
<p>Initial public release</p>
 
160
</li>
 
161
</ul>
 
162
<p>
 
163
</p>
 
164
<h2><a name="reporting_a_bug">Reporting a bug</a></h2>
 
165
<p>Questions/patches may be directed to Weibin Yao, <a href="mailto:yaoweibin@gmail.com.">yaoweibin@gmail.com.</a></p>
 
166
 
 
167
</body>
 
168
 
 
169
</html>