请教 v2 大佬们以下 nginx 反向代理配置报错问题
資深大佬 : qwer666df 4
需求想的是,在访问 test.cc/sss 的时候转到 http://localhost:8001 地址
其中:
- http://127.0.0.1:8001/sss/list 这个地址是可以正常访问的
- 防火墙已经关闭
- 是 Python 项目, 不是 php 项目, , 因为 Google 了一圈发现都是说 php-fpm+nginx 的问题
报错信息
2020/11/25 13:43:56 [error] 7#7: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.19.0.1, server: test.cc, request: "GET /sss/list HTTP/1.1", upstream: "http://127.0.0.1:8001/sss/list", host: "test.cc"
nginx.conf
upstream websocket { ip_hash; server 127.0.0.1:3101 weight=1 max_fails=2 fail_timeout=30s; server 127.0.0.1:3102 weight=1 max_fails=2 fail_timeout=30s; server 127.0.0.1:3103 weight=1 max_fails=2 fail_timeout=30s; } server { listen 80; server_name test.cc; location ~ /sss/ { proxy_pass http://localhost:8001; } }
大佬有話說 (20)