nginx集群配置教程
#集群配置
upstream tomcats{
# server 192.168.85.131:8080 weight=5;
server 127.0.0.1:8080;
server 127.0.0.1:8090;
}
#反响代理配置 127.0.0.1或localhost访问
server {
listen 80;
server_name localhost;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
# 要进行反响代理的地址
location / {
# proxy_pass http://127.0.0.1:8080;
proxy_pass http://tomcats;
}
}