回答
收藏
分享
举报
提问:Nginx+haproxy高可用架构报Error:connect() failed (111: Connection refused) while connecting to upstream
提问于2022-05-17 11:02

浏览 3.6k

客户生产环境,架构为Nginx+haproxy,在请求时日志里有connect() failed (111: Connection refused) while connecting to upstream, client: xxxxxxx, server: localhost  信息。
此问题不知是否为网络网关配置导致的,希望有大神帮忙分析一下原因。 

指向的页面是用vue写的。

nginx.conf 中的部分配置如下

location ^~ /busimod/ {
    proxy_pass http://127.0.0.1:8101/;
    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_redirect off;
}
location ^~ / {
    try_files $uri $uri/ @router;
    index busiPage.html;
}
location @router {
    rewrite ^.*$ /busiPage.html last;
}



已修改于2023-03-17 15:43



写下您的回答
发表回答
全部回答(0)

按点赞数排序

按时间排序

提问者
坚宏
这家伙很懒还未留下介绍~
0
文章
1
问答
0
粉丝
相关问答

如果您的服务器处于内网,必须有一个反向代理服务器来把客户流量引入到服务器上。也就是这种情况下是不能删除反向代理服务器的。

点赞 0
浏览 3.6k

上游应用是否已经增加了处理跨域的header,如果有则不需要重复增加。

点赞 0
浏览 4.5k