[英]How to config nginx about proxy_pass?
如果在http://127.0.0.1:8080/edu/b.html
或http://192.168.0.102:8080/edu/b.html
就可以了
如果在http://192.168.0.102:9001/edu/b.html
它不能工作
我的电脑ip现在是
192.168.0.102
错误信息
[error] 17810#17810: *12 connect() failed (111: Connection refused) while connecting to upstream, client: 192 .168.0.102, server: 192.168.0.102, request: "GET /edu/b.html HTTP/1.1", upstream: "http://127.0.0.1:8000/edu/b.html", host: "192. 168.0.102:9001"
错误在哪里? 我该怎么办?
它试图连接到http://127.0.0.1:8000/edu/b.html
(上游)而不是http://192.168.0.102:8080/edu/b.html
。 您需要更改 nginx.conf 中的上游端口
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.