replace string in content

Jeszenszky Zoltán jeszenszky.zoltan at gmail.com
Fri Oct 19 22:22:14 UTC 2012


Hello,

I just add these rows to the default config
(/usr/local/nginx/conf/nginx.conf) at the end of the location section:

        location / {
            root   html;
            index  index.html index.htm;
        sub_filter      nginx 'newstring';
        sub_filter_once off;
        subs_filter_types text/html text/css text/xml;
        subs_filter nginx 'newstring' i;
        }

But if I see the http://localhost in firefox there is no "newstring"
instead of "nginx".
Why? I expected to replace the nginx string...

/usr/src/nginx/nginx-1.2.4# /usr/local/nginx/sbin/nginx -V
nginx version: nginx/1.2.4
built by gcc 4.4.3 (Ubuntu 4.4.3-4ubuntu5.1)
TLS SNI support enabled
configure arguments: --with-pcre-jit --with-debug --with-file-aio
--with-http_addition_module --with-http_dav_module --with-http_flv_module
--with-http_gzip_static_module --with-http_mp4_module
--with-http_random_index_module --with-http_realip_module
--with-http_secure_link_module --with-http_stub_status_module
--with-http_ssl_module --with-http_sub_module
--add-module=/usr/src/nginx/ngx_http_substitutions_filter_module/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121020/a1ad8e3c/attachment.html>


More information about the nginx mailing list