nginx负载均衡轮询失效

upstream lxppp{
        server 192.168.37.161:8082 weight=1 max_fails=5 fail_timeout=30s;
        server 192.168.37.161:8080 weight=1 max_fails=5 fail_timeout=30s;
    
    }
    server {
        listen       80;
        server_name  www.lxppp.com;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            proxy_pass   http://lxppp;
            index  index.html index.htm;
        }
                
    }

配置如上,权重都是1的时候一直是访问第一个服务器,把第一个服务器权重改为2就有效,上面那个服务器访问两次,下面那个一次

猜你喜欢

转载自blog.csdn.net/qq_28875221/article/details/84786267
今日推荐