配置Nginx代理
location /name/ {
proxy_pass http://target/;
}
当访问此location的时候,请求会被转发到http://target;
配置Nginx反向代理
upstream nginx {
server www.bxp1.com:8080 weight=1;
server www.bxp2.com:8080;
}
server {
location / {
proxy_pass http://nginx;
}
}
请求先访问server ,通过server的proxy_pass转发到相应的upstream,再根据权重进行请求分发。

2377

被折叠的 条评论
为什么被折叠?



