首页 > Web开发 > 详细

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

时间:2017-10-11 12:39:51      阅读:587      评论:0      收藏:0      [点我收藏+]

nginx在配置proxy_pass的时候 URL结尾加斜线(/)与不加的区别和注意事项

 

 

假设访问路径的 /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

技术分享

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

原文:http://www.cnblogs.com/peachyy/p/7649794.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!