nginx A配置:

location /foo/ {
  proxy_pass http://192.168.1.56/;
}

nginx B收到的请求://api

案例3

nginx A配置:

location /foo/ {
  proxy_pass http://192.168.1.56/;
}

nginx B收到的请求:/foo/api

案例4

nginx A配置:

location /foo/ {
  proxy_pass http://192.168.1.56/;
}

nginx B收到的请求:/foo/api

案例5

nginx A配置:

location /foo/ {
  proxy_pass http://192.168.1.56/bar/;
}

nginx B收到的请求:/bar/api

案例6

nginx A配置:

location /foo {
  proxy_pass http://192.168.1.56/bar/;
}
 2/6   首页 上一页 1 2 3 4 5 6 下一页 尾页

文章TAG:nginx  反向代理  斜线  nginx  斜线  
下一篇