The problem is that proxy_pass is not configured correctly. The problem is that proxy_pass is not configured correctly. The problem is that proxy_pass is not configured correctly. The individual is lazy, direct reference to the answer on hu bar:

When you configure the proxy_pass reverse proxy in nginx, if you add/to the following URL, which is the absolute root path, then nginx will not give the proxy the matching portion of the path in the location. If there is no /, the matching path portion is also given to the proxy.

Ex. :

Access path:

/pss/bill.html
1. When the Nginx configuration file proxy_pass has a “/” URL:
Location/PSS / {proxy_pass http://127.0.0.1:18081/; }

Agent to the backend path is: http://127.0.0.1:18081/bill.html, omitted to match/PSS/path;

2. When the URL following the proxy_pass in the Nginx configuration file does not include “/” :
Location/PSS / {proxy_pass http://127.0.0.1:18081; }

Agent to the backend path is: http://127.0.0.1:18081/pss/bill.html, along with the match to the PSS/path, reverse proxy together;

Author: managed links: https://www.zhihu.com/questio… Copyright belongs to the author. For commercial reprint, please contact the author for authorization. For non-commercial reprint, please note the source.