加权配置方法

 

 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

 

 

 

 

 

 

posted @ 2020-08-31 21:12  六月OvO  阅读(161)  评论(0编辑  收藏  举报