【发布时间】:2022-02-21 16:53:25
【问题描述】:
我将 springboot 项目部署在 docker 容器中打开端口 8080 以及 nginx 服务器打开端口 80 enter image description here
当我使用 卷曲 http://localhost:8080/heya/index 正常返回
但是当我使用 curl http://localhost/heya/index 希望我可以从 nginx 代理访问,它失败了。我检查了日志,它说
*24#24: 11 connect() 在连接到上游时失败(111:连接被拒绝),客户端:172.17.0.1,服务器:,请求:“GET /heya/index HTTP/1.1 ", 上游: "http://127.0.0.1:8080/heya/index", 主机: "localhost"
这是我的 nginx.conf
我想不通,需要帮助。
【问题讨论】:
-
将配置和输出添加为文本而不是图像链接
-
以后,请将所有相关代码和错误以文字形式发布,而不是图片。