ip_hash的配置方法

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

接上

 

 

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

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:30  六月OvO  阅读(1317)  评论(0编辑  收藏  举报