0
点赞
收藏
分享

微信扫一扫

nginx配置proxy_pass URL末尾加与不加/(斜线)的区别

日月同辉9908 2022-02-16 阅读 58

假设访问路径的 /pss/bill.html

加/斜线的情况
location /pss/ {
proxy_pass http://127.0.0.1:18081/;
}
被代理的真实访问路径为:http://127.0.0.1:18081/bill.html

不加/斜线的情况

location /pss/ {
proxy_pass http://127.0.0.1:18081;
}
被代理的真实访问路径为:http://127.0.0.1:18081/pss/bill.html

举报

相关推荐

0 条评论