下载Nginx安装包
从nginx的官网下载对应的Nginx版本,并将其解压。
下载地址:http://nginx.org/en/download.html
使用upstream设置负载均衡列表
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;
}
网友评论