在http子產品 加入
upstream fuzai{
server 伺服器ip; #有端口的話 ip:端口 預設80端口可以不寫
}
在server 子產品需要負載的location加入
location / {
proxy_pass http://fuzai;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
…………………
本文轉自無形于有形 51CTO部落格,原文連結:http://blog.51cto.com/jinchuang/1844466,如需轉載請自行聯系原作者