-
Notifications
You must be signed in to change notification settings - Fork 59.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] nginx反代失败502 Bad Gateway #1594
Comments
docker run 加上--network="host" 参数 试试是否解决问题 |
已解决。 |
老哥,proxy_by这个在哪修改,遇到同样的问题了 |
Brother, where to modify proxy_by, I have encountered the same problem |
In nginx config file. My pen mistake is proxy_pass instead of proxy_by, and now my original reply has been corrected.
172.17.0.15 is my IPv4 address for eth0. |
谢谢老哥,解决问题啦 |
反馈须知
描述问题
本意是想实现二级域名访问本服务的功能, chat.xxx.xxx。
使用nginx对本项目进行反代,访问遇到502,查看nginx日志,报错如下:
服务本身没问题,防火墙开放3000端口,绕过nginx,直接域名:3000可以正常访问。
nginx本身也没问题,一起反代的其他项目在正常使用。
如何复现
docker部署nginx和本项目,并开放了相关端口。
部署指令:
经测试,即使去掉
--net=host \
仍然出现同样问题。nginx配置文件:
一些必要的信息
The text was updated successfully, but these errors were encountered: