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 注意: 如果你的错误提示中出现了域名,比如:
修正即可。 (编辑:鄂州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- Kubernetes Nginx:如何实现零停机部署?
- nginx – 如果我们不关闭cgi.fix_pathinfo,服务器是否仍然容
- php – nginx/fastcgi 504网关错误,增加fastcgi_read_timeo
- 配置Nginx以使Angular 2快速入门与Browsersync一起使用
- django – 使用proxy_pass的nginx位置路径
- nginx – 如何将域名指向另一个网站的页面?
- nginx – 如何在不解密的情况下路由HTTPS加密数据包?
- 如何在Heroku上使用REST API后端最佳地提供静态文件
- 我应该在nginx中使用rewrite或return或proxy_pass吗?
- nginx-启用了ngx_http_realip_module的白名单cloudflare Ip