[英]nginx: [emerg] unknown directive “absolute_redirect”
I have the following config: 我有以下配置:
...
server {
expires off;
absolute_redirect off;
listen 8080;
server_name localhost;
# listen 80 default_server;
# listen [::]:80 default_server ipv6only=on;
# listen 443 ssl;
client_body_timeout 36s;
client_header_timeout 36s;
keepalive_timeout 36s;
send_timeout 36s;
....
this config cannot pass the test service nginx configtest
. 此配置无法通过测试
service nginx configtest
。 Command nginx -t
show me the following: 命令
nginx -t
向我显示以下内容:
nginx: [emerg] unknown directive "absolute_redirect" in /etc/nginx/nginx.conf:44
nginx: configuration file /etc/nginx/nginx.conf test failed
What is wrong with absolute_redirect
? absolute_redirect
什么问题?
NB: nginx version: nginx/1.10.3 (Ubuntu) 注意:nginx版本:nginx / 1.10.3(Ubuntu)
My fault, I used an old version of nginx. 我的错,我使用了旧版本的Nginx。
absolute_redirect
is supported only since nginx 1.118 仅从nginx 1.118开始才支持
absolute_redirect
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.