Appearance
nginx location
// 参考定向
server {
......
location /api... {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:端口
}
}假设请求地址:
http://localhost/online/wxapi/test/loginSwitchproxy_pass最后没有/结尾- 有则从location /... 处截断

- 无则从location /... 处开始拼接

- 指定匹配路径

- 有则从location /... 处截断