Welcome! Log In Create A New Profile

Advanced

replace string in content

Jeszenszky Zoltán
October 19, 2012 06:24PM
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/
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

replace string in content

Jeszenszky Zoltán October 19, 2012 06:24PM

Re: replace string in content

Jeszenszky Zoltán October 21, 2012 07:42AM

Re: replace string in content

VBart October 21, 2012 05:46PM

Re: replace string in content

Jeszenszky Zoltán October 22, 2012 04:28AM

Re: replace string in content

Jeszenszky Zoltán October 22, 2012 03:54PM

Re: replace string in content

Jeszenszky Zoltán October 22, 2012 06:22PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 284
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready