Nginx添加了一个虚拟主机后重新启动报错如下:
nginx:[warn] conflicting server name "abc_blog.com" on 12.23.34.56:80,ignored
nginx:[warn] conflicting server name "www.abc_blog.com" on 12.23.34.56:80,ignored
网上查到答案:
出现这个错误一般是由于技术员的粗心造成的,原因是相同的域名abc_blog.com出现两次甚至是多次
我用grep 搜索了一下没有发现重复的配置文件,后来我发现是include问题
我在nginx.conf中有很多条include,我删除其中一条就行,好像nginx认为下面两条重复
include/data/myconf/nginx/vhosts/abc/*.conf;
include/data/myconf/nginx/vhosts/*/*.conf;
转载于:https://blog.51cto.com/leeforget/1285461