nginx在配置proxy_pass的時候 URL結尾加斜線(/)與不加的區別和注意事項html
假設訪問路徑的 /pss/bill.htmlnginx
加/斜線的狀況spa
location /pss/ { proxy_pass http://127.0.0.1:18081/; }
被代理的真實訪問路徑爲:http://127.0.0.1:18081/bill.html代理
不加/斜線的狀況code
location /pss/ { proxy_pass http://127.0.0.1:18081; }
被代理的真實訪問路徑爲:http://127.0.0.1:18081/pss/bill.htmlhtm