V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
lixiaonan777
V2EX  ›  问与答

no live upstreams while connecting to upstream

  •  
  •   lixiaonan777 · Jan 19, 2019 · 1238 views
    This topic created in 2662 days ago, the information mentioned may be changed or developed.

    我用 vmware+centos 做了 3 个虚拟机,用 nginx 做负载均衡。 分别是 192.168.8.128 ,192.168.8.129 ,192.168.8.130 3 台虚拟机上都安装了 nginx 192.168.8.128 作为代理服务器 192.168.8.129 ,192.168.8.130 这 2 台服务器提供的内容都是只有一个静态的 index.html 文件 单独访问这 2 台服务器都可以打开 如果代理服务器配置修改成 proxy_pass http://192.168.8.129:80; 访问 192.168.8.128 会显示 http://192.168.8.129 下的网页内容 但是代理服务器如果用 upstream,配置文件如下: upstream proxy_servers { server 192.168.8.129:80; server 192.168.8.130:80; } server { listen 80; server_name localhost; index index.html; location / { proxy_pass http://proxy_servers; } } 访问 192.168.8.128 总是 502 错误。日志都是: upstream prematurely closed connection while reading response header from upstream 或: no live upstreams while connecting to upstream 求助!

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2898 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 06:26 · PVG 14:26 · LAX 23:26 · JFK 02:26
    ♥ Do have faith in what you're doing.