http{
......
upstream name001{
ip_hash; //
server 127.0.0.1:9001;
server 127.0.0.1:9002;
......
}
server{
......
location /api {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://name001/;
}
}
}
网友评论