upstream localhost {
ip_hash;
server 192.168.0.55;
server 192.168.0.53;
}
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
proxy_pass [color=red]http://localhost;[/color]
proxy_set_header Host $host;
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
最简单的Nginx负载均衡设置
最新推荐文章于 2024-11-01 15:32:36 发布