欢迎光临
我们一直在努力

服务器部署_nginx报错: [warn] conflicting server name “www.test.com” on 0.0.0.0:80, ignored

今天修改nginx配置文件nginx.conf之后,启动nginx就会报错。经仔细检查是重复配置了 server元素导致,

当nginx检测到重复的 server_name item.test.com,就会报这个错 [warn] conflicting server name “www.test.com” on 0.0.0.0:80, ignored

server
{
listen 80;
server_name item.test.com;
access_log /export/servers/nginx/logs/access.log main;
error_log /export/servers/nginx/logs/error.log warn;
chunkin on;
error_page 411 = @my_error;
location @my_error {
chunkin_resume;
}
root /export/data/tomcatRoot/item.soa.360buy.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_item.soa;
expires 1d;
}
location /logs/ {
autoindex off;
deny all;
}
}

未经允许不得转载:mbku » 服务器部署_nginx报错: [warn] conflicting server name “www.test.com” on 0.0.0.0:80, ignored

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

翰林黄金-重庆运营中心

翰林黄金翰林金业