vi nginx.conf
在#gzip on; 之后添加:
upstream org.tonny.balance {
server 127.0.0.1:8081 weight=1;
server 127.0.0.1:8082 weight=1;
}
在server节点下:
location / {
root html;
index index.html index.htm;
proxy_pass http://org.tonny.balance
}
location / {
proxy_pass http://127.0.0.1:81;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
# for websocket
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。