1.
后台启动两个网站 5000 6001
upstream 后的名字 www.test.com 是随便起的,最好是见名知意
weigth 表示访问到该网址的权重,数字越大访问到的几率越大
配置后重启
upstream www.test.com{ server 127.0.0.1:5000 weight=1; server 127.0.0.1:6001 weight=1; }
location /{ proxy_pass http://www.test.com; }
2.IP绑定
根据hash计算选择固定服务器,解决session丢失的问题
3.