nginx: [warn] conflicting server name “localhost” on 0.0.0.0:80, ignored

修改nginx配置参数后,使用nginx -t检查配置.

1
nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored

提示successfull后就可以使用 nginx -s reload来重新加载配置

我配置的过程中遇到这样的问题,就是绑定了主机名后,重新加载配置时会出现警告

1
nginx: [warn] conflicting server name "localhost" on 0.0.0.0:80, ignored

意思是重复绑定了server name,但这个警告不会影响到服务器运行。而且,这个重复绑定的意思是现在运行的nginx服务和将要加载的新配置中的重复,所以,这个警告其实是不必的。

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this post. TrackBack URL