python - Nginx (113: No route to host) 同时连接到上游
问题描述
# error message
[error] 21#21: *3 connect() failed (113: No route to host) while connecting to upstream,
# nginx/nginx.conf
server {
listen 1234;
client_body_buffer_size 10M;
client_max_body_size 10M;
location / {
include uwsgi_params;
uwsgi_pass flask:900;
}
}
# docker-compose.yaml
version: "3.7"
services:
flask:
build: ./flask
container_name: flask
restart: always
expose:
- 900
nginx:
build: ./nginx
container_name: nginx
restart: always
ports:
- "80:1234"
你好。我在 EC2 ubuntu 18.04 服务器上制作了两张图片。“构建”和“向上”的过程是成功的。但是,我无法通过 API POST 与本地 PC 建立连接。
最重要的是我的错误消息和主要配置文件。请帮助初学者开发人员.. 非常感谢 Stackoverflowers。
解决方案
推荐阅读
- python - 如何用汇编或 C 编写 py 文件?
- c++ - 如何清理最小生成树
- java - CDI 在合格的 jaxrs 资源类中不起作用
- python - Python Pandas xlsxriter 堆积折线图类型设置Excel中的标准折线图
- java - 如何使用 Android KeyStore 确认密钥存储在 TEE(不是 SE)中?
- python - Linux或window都是一样的 :p -> HttpException('无效的HTTP请求形式(预期:权威或绝对,得到:相对)')
- jquery - 使用 ASP.NET Core 剃须刀页面从数据库中为 jQuery 数组动态分配值
- reactjs - 失败的道具类型:必须在容器上使用 Grid 的道具 justify
- android - 如何使用动画旋转图层列表中的项目?
- sql - SQL Server 代理作业不执行 SSIS 包权限错误