Opened 9 years ago

Closed 9 years ago

#804 closed defect (invalid)

Error while using Several sub_filter directives

Reported by: christoph.z-online.net@… Owned by:
Priority: minor Milestone:
Component: nginx-module Version: 1.0.x
Keywords: sub_filter Cc:
uname -a: Linux t-jira01 2.6.32-573.3.1.el6.x86_64 #1 SMP Mon Aug 10 09:44:54 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.0.15
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/var/run/nginx.pid --lock-path=/var/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module --with-http_image_filter_module --with-http_geoip_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_stub_status_module --with-http_perl_module --with-mail --with-mail_ssl_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic' --with-ld-opt=-Wl,-E

Description

If i try to replace more than one string, i get this error:

[root@t-conflu01 conf.d]# nginx -t
nginx: [emerg] "sub_filter" directive is duplicate in /etc/nginx/conf.d/t-conflu.conf:34
nginx: configuration file /etc/nginx/nginx.conf test failed

Here my config:

server {
	...
    sub_filter 'dcportal.corp.dir/confluence' 'confluence.corp.dir';
    sub_filter 'dcportal.corp.dir/jira' 'jira.corp.dir';
    sub_filter_once off;
	...
}

Change History (1)

comment:1 by Maxim Dounin, 9 years ago

Resolution: invalid
Status: newclosed

Multiple sub_filter directives are supported in nginx 1.9.4+. The version you are using (1.0.15) is way too old.

Note: See TracTickets for help on using tickets.