1. proxy_pass slash or slash suffix without location at the end
- If there is no "/" or "/xx" after proxy_pass, the original string in location is included;
- If there is no url path information (such as "/", "/xx") after proxy_pass, the reverse proxy address will include the location part; otherwise, only the remaining paths after matching will be spliced.
location /online/wxapi/
proxy_pass http://localhost:8080/
Visiting "http://www.x.com/online/wxapi/a.html" will access:
http://localhost:8080/a.html
location /online/wxapi/
proxy_pass http://localhost:8080
Visit "http://www.x.com/online/wxapi/xx.html" to access
http://localhost:8080/online/wxapi/xx.html
2. Summary:
- You do not add location when you add "/" to access;
- When you don't add "/" to access, it will add location to you;
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。