nginx精准反向代理

1,完全反向代理,将请求10.130.111.110服务器的请求全部转发到10.130.111.111服务器

location / {
proxy_pass http://10.130.111.111
}

 2,仅仅转发部分请求 将请求10.130.111.110服务器的/sub/static段的都转发到10.130.111.111/sub/static,其他段请求不转发

location /sub/static {
    proxy_pass http://10.130.111.111/sub/static
}

 

posted @ 2019-11-22 13:37  aaronthon  阅读(257)  评论(0编辑  收藏  举报