1、多节点启动
节点1:120.79.160.152:8082/
节点2:120.79.160.153:8082
2、配置nginx集群访问
upstream lbs {
server 120.79.160.152:8082/;
server 120.79.160.153:8082;
}
location /api/ {
proxy_pass http://lbs;
proxy_redirect default;
}
location /user/ {
proxy_pass http://lbs;
proxy_redirect default;
}
3、重启nginx命令
./nginx -s reload