NGINX 启动[warn]: conflicting server name “xxx.com” on 0.0.0.0:80, ignored原因分析

Nginx

今天将客户的网站从自己的一个VPS转移到另一个VPS中,我VPS都是用的军哥的LNMP包搭建的lnmp环境。

由于我有个域名现在根域名和绝对域名都是直接做的301定向。所以我就给直接复制的原来的vhost下面的配置文件。但是粗心了一次,原来的配置文件我就直接改成了xxx2.conf

然后直接上传的xxx.conf

然后/root/lnmp restart

结果就报错了:

报错如下:

nginx: [warn] conflicting server name "www.xxx.com" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "xxx.com" on 0.0.0.0:80, ignored

百度,谷歌了一下。域名重复配置所致。这种事情被很多技术人员也是容易犯的。

因为都喜欢自己复制配置文件。

后来我将vhost目录下的xxx2.conf删除。

restart 下,正常了。。

 


《 “NGINX 启动[warn]: conflicting server name “xxx.com” on 0.0.0.0:80, ignored原因分析” 》 有 2 条评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注