0

在我的服务器块中,我已经配置了这个位置

location  / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-SERVER-ADDR $server_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://localhost:8085;
    }

一切都如我所愿。但是今天下午我在 13 秒内收到了 1,553 个错误。下面是一个示例错误日志:

2021/05/26 17:32:56 [error] 12754#0: *95156579 no live upstreams while connecting to upstream, client: 27.216.137.199, server: example.com, request: "POST /home/scenario/gamePreLoad HTTP/1.1", upstream: "http://localhost/home/scenario/gamePreLoad", host: "example.com"

首先,我认为我的服务中断了。但是日志显示nginx将请求传递给了localhostother than localhost:8085,这很奇怪。

我还查看了操作日志,当时没有人更改 nginx 配置文件。

我想知道为什么 Nginx proxy_pass 到错误的上游,为什么这件事发生了?

任何帮助将不胜感激!

4

0 回答 0