下載Nginx安裝包
從nginx的官網(wǎng)下載對應(yīng)的Nginx版本,并將其解壓勘高。
下載地址:http://nginx.org/en/download.html
使用upstream設(shè)置負(fù)載均衡列表
server {
listen 80;
include proxy.conf;
server_name openapi.xxxxxx.com;
location ^~ /suggest/{
proxy_pass http://suggest.elong.com/;
}
location /{
return 402;
}
location ~* ^/test/ {
return 403;
}
}
upstream suggest.elong.com {
server 192.168.17.46:9102;
}