文章内容

2019/10/4 16:25:26,作 者: 黄兵

Nginx Restart Error: emerg duplicate upstream

最近在重新配置Nginx的时候,出现了如下错误:

nginx: [emerg] duplicate upstream "hellomvc" in /etc/nginx/sites-enabled/OAuth.xxx.com:1

nginx: configuration file /etc/nginx/nginx.conf test failed


出现问题的原因:

有多个名称为“hellomvc”的名称。

之后我检查了所有的配置文件,也没有找到多个hellomvc名称,原来具体配置如下:

upstream hellomvc{
	server localhost:5000;
}


解决方案:

删除upstream配置指令。

替换proxy_pass http://hellomvc为:

proxy_pass http://localhost:5000;


参考资料:

1、Nginx Restart Error: emerg duplicate upstream


黄兵个人博客原创。

转载请注明出处:黄兵个人博客 - Nginx Restart Error: emerg duplicate upstream

分享到:

发表评论

评论列表