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末尾加与不加/(斜线)的区别

相关文章:

  • 2021-07-04
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2021-05-24
  • 2023-03-22
猜你喜欢
  • 2022-12-23
  • 2022-02-01
  • 2021-08-13
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-10-29
相关资源
相似解决方案