我这里遇到了问题。我在 Debian 上通过 apt 安装了 nginx,因此它的输出如下nginx -V
:
nginx version: nginx/1.6.2
TLS SNI support enabled
configure arguments: --with-cc-opt='-g -O2 -fstack-protector-strong -Wformat -Werror=format-se
curity -D_FORTIFY_SOURCE=2' --with-ld-opt=-Wl,-z,relro --prefix=/usr/share/nginx --conf-path=/
etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx
/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-
path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-pat
h=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/l
ib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stu
b_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition
_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-
http_image_filter_module --with-http_spdy_module --with-http_sub_module --with-http_xslt_modul
e --with-mail --with-mail_ssl_module --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modul
es/nginx-auth-pam --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-dav-ext-mo
dule --add-module=/build/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-echo --add-module=/buil
d/nginx-ryOGNl/nginx-1.6.2/debian/modules/nginx-upstream-fair --add-module=/build/nginx-ryOGNl
/nginx-1.6.2/debian/modules/ngx_http_substitutions_filter_module
如您所见,该模块(此处建议:https://coreos.com/os/docs/latest/nginx-host-cloud-config.html) 应该可以工作...但是它却不行!每当我sub_filter
为位置添加多个参数时,就会nginx -t
失败:
nginx: [emerg] "sub_filter" directive is duplicate in /etc/nginx/sites-enabled/default:46
nginx: configuration file /etc/nginx/nginx.conf test failed
该怎么办?谢谢。