nginx: [warn] conflicting server name on 0.0.0.0:80, ignored
《nginx: [warn] conflicting server name "" on 0.0.0.0:80,ignored》要点: 在启动Nginx时,出现如下错误: nginx: [warn] conflicting server name "" on 0.0.0.0:80,ignored 检查: [root@iZuf67db nginx]# nginx -t nginx: [warn] conflicting server name "" on 0.0.0.0:80, ignored 这个是因为在配置文件中,有空的server{},如下: server { # listen 80; # server_name jb51.cc; # return 301 http://www.jb51.cc$request_uri; } 只要全部注释掉就好 #server { # listen 80; # server_name jb51.cc; # return 301 #} 再检查就不会出错: [root@iZuf67db vhost]# nginx -t the configuration file /nginx/conf/nginx.conf syntax is ok configuration file /nginx/conf/nginx.conf test is successful 注意: 如果你的错误提示中出现了域名,比如:
修正即可。 (编辑:岳阳站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- nginx – 为什么Laravel在所有路由工作时仍然记录NotFoundH
- asp.net – 如何配置nginx以支持cloudflare下的signalr3?
- ssl-Kubernetes:Nginx入口注释- nginx.ingress.kubernetes
- 禁用特定目录中图像的nginx缓存
- 如何使用Nginx(healthd)在access_log文件名中使用变量
- javascript – Node.js请求返回301重定向
- linux – Nginx使用writev()和sendfile()
- jQuery-浏览器和AJAX响应CORS标头不同
- Nginx php-fpm随机挂起
- nginx反向代理图像和css未加载