服务器部署_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;
}
}
持续学习、持续收获才能带来持续的满足和快乐!