[英](Nginx Windows) nginx: [emerg] unknown directive “serversupstream”
[英]nginx: [emerg] unknown directive “absolute_redirect”
我有以下配置:
...
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;
....
此配置無法通過測試service nginx configtest
。 命令nginx -t
向我顯示以下內容:
nginx: [emerg] unknown directive "absolute_redirect" in /etc/nginx/nginx.conf:44
nginx: configuration file /etc/nginx/nginx.conf test failed
absolute_redirect
什么問題?
注意:nginx版本:nginx / 1.10.3(Ubuntu)
我的錯,我使用了舊版本的Nginx。 僅從nginx 1.118開始才支持absolute_redirect
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.