微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

nginx: [emerg] duplicate upstream "test2" in /usr/local/nginx/conf/sites-enabled/test2.con

使用/usr/local/Nginx/sbin/Nginx -t 检查Nginx配置文件时报错:

Nginx: [emerg] duplicate upstream "test2" in /usr/local/Nginx/sites-enabled/test2.conf:1
Nginx: configuration file /usr/local/Nginx/conf/Nginx.conf test Failed

 

原因:有相同名称的upstream,可以grep查找一下

[root@test sites-enabled]# grep inner-upload *
test2.conf:upstream inner-upload {
test2.conf: proxy_pass http://test2;
test1.conf:upstream inner-upload {
test1.conf: proxy_pass http://test2;

 

解决方案:改下upstream名称,或者删除之前的upstream

 

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐