Precision nginx reverse proxy

1, completely reverse proxy server will request 10.130.111.110 10.130.111.111 server forwards the request to all

location / {
proxy_pass http://10.130.111.111
}

 2, only the forward part of the request are forwarded to the request 10.130.111.111/sub/static / sub / static segment 10.130.111.110 server, requests are not forwarded to other segments

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

 

 

 

Guess you like

Origin www.cnblogs.com/aaronthon/p/11911030.html