V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
lixiaonan777
V2EX  ›  问与答

no live upstreams while connecting to upstream

  •  
  •   lixiaonan777 · 2019 年 1 月 19 日 · 1196 次点击
    这是一个创建于 2633 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我用 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 求助!

    目前尚无回复
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2290 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 00:44 · PVG 08:44 · LAX 17:44 · JFK 20:44
    ♥ Do have faith in what you're doing.