Nginx绕过proxy_pass

时间:2016-01-10 06:19:36

标签: nginx load-balancing reverse-proxy

在我的conf文件中我有

upstream backend {
        server xx.xx.xx.xx:8080;
        server xx.xx.xx.xx:8080;
        }

然后

location /adcode/adcode {
        proxy_set_header HOST $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X_IP $remote_addr;
        proxy_pass http://backend;
}

但有时而不是请求转到上游服务器。它转到http://backend/adcode/adcode

016/01/10 14:14:46 [error] 18474#0: *149951 no live upstreams while connecting to upstream, client: 208.107.89.45, server: _, request: "GET /adcode/adcode?crid=1744&refUrl=&cbrs=51487486&zz=51 HTTP/1.1", upstream: "http://backend/adcode/adcode?crid=1744&refUrl=&cbrs=51487486&zz=51", host: "show.*****.com", referrer: "http://show.****.com/adcode/adcode?crid=1744&cbrs=50633123&zz=11"

我不知道为什么要这样做。有什么建议 ?

0 个答案:

没有答案