加权配置方法

 https://www.cnblogs.com/chenlifan/p/13591837.html

接上

1.修改配置文件

[root@lb01 ~]# vim /etc/nginx/conf.d/node_proxy.conf 
upstream web {
    server 172.16.1.7:80 weight=4;
    server 172.16.1.8:80 weight=1;
}

server {
    listen 80;
    server_name linux.node.com;

    location / {
        proxy_pass http://web;
        include proxy_params;
    }
}

[root@lb01 ~]# systemctl restart nginx

 

原文地址:https://www.cnblogs.com/chenlifan/p/13591997.html