在数字海洋上使用dokku部署python烧瓶应用程序后,我遇到了502 Bad Gateway错误。我跟随本教程使用dokku在数字海洋上部署我的应用程序。
2018/10/23 07:40:59 [error] 28652#28652: *1 connect() failed (111: Connection refused) while connecting to upstream, client: xxx.xxx.xxx.xx, server: api.domain.com, request: "GET / HTTP/1.1", upstream: "http://172.17.0.3:5000/", host: "api.domain.com"以下是该应用程序已启动并侦听请求的证据:
2018-10-23T07:37:30.165794640Z app[web.1]: [2018-10-23 07:37:30 +0000] [9] [INFO] Listening at: http://127.0.0.1:8000 (9)我的问题是如何在python应用程序中配置proxy_pass。
发布于 2018-10-23 12:26:23
将请求发送到upstream: "http://172.17.0.3:5000/",服务器正在侦听http://127.0.0.1:8000
如果中间没有翻译层,我会说这是你的问题。
您必须在同一端口(5000或8000 )收听。如果要从外部访问应用程序,请选择一个),并且无法侦听localhost/127.0.0.1。
https://serverfault.com/questions/936755
复制相似问题