修改nginx配置后,使用 nginx -t
命令检查,提示 nginx: [warn] conflicting server name "127.0.0.1" on 0.0.0.0:8010, ignored
。
![](https://img.haomeiwen.com/i3876828/064b75fdf20f6169.jpg)
完整输出如下:
nginx: [warn] conflicting server name "127.0.0.1" on 0.0.0.0:8010, ignored
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
经检查是 nginx.conf
配置文件中的 server
使用了重复的端口号
,删除或修改其他端口号
,就不会有这个 warn
了。
欢迎访问:天问博客
网友评论