nginx 反向代理 && 负载均衡
upstream tomcats{
server localhost:8080 weight=1;
server localhost:8081 weight=3;
}
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://tomcats;
}
}
upstream tomcats{
server localhost:8080 weight=1;
server localhost:8081 weight=3;
}
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://tomcats;
}
}