upstream tomca {
# 需要负载的server列表,weight表示权重,weight默认为1,如果多个配置权重的节点,比较相对值
server localhost:9001 weight=11;
server localhost:9002 weight=10;
}
location /myport{
add_header 'Access-Control-Allow-Origin' '*';
proxy_pass http://tomca/test/;
}
评论区