您的位置:首页 > 运维架构 > Nginx

nginx -t "nginx: [warn] only the last index in "index" directive should be absolute in 6 "的问题解决

2014-04-14 15:42 2111 查看
修改完nginx的配置文件之后,执行nginx -t命令提示"nginx: [warn] only the last index in "index" directive should be absolute in 6 "

相关代码段为:

server
{
listen                   80;
server_name              www.web1.com;
index                    index.jsp index.html index.htm
access_log               /export/servers/nginx/logs/www.web1.com/access.log main;
error_log                /export/servers/nginx/logs/www.web1.com/error.log warn;
#chunkin on;
error_page 411 = @my_error;
location @my_error {
#chunkin_resume;
}
root /export/data/tomcatRoot/www.web1.com/;

location / {
proxy_next_upstream     http_500 http_502 http_503 http_504 error timeout invalid_header;
proxy_set_header        Host  $host;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass              http://tomcat_web1; expires                 1d;
}
location /logs/ {
autoindex       off;
deny all;
}

}


发现问题没? 原来是第5行少了一个;号...

填上,解决...
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐