There are two places a trailing slash matters:
-
After a
locationrule; -
After
proxy_pass.
Test URL:
https://www.xxxx.com/minio/ucenter/imgs/885058fa-dff6-4d60-875d-bb7dd2098ce9.png
For
location
, the first case:
|
|
Conclusion: with or without the slash on
location
makes no difference.
Second case, variant 1:
|
|
The backend address actually requested:
127.0.0.1:9000/ucenter/imgs/885058fa-dff6-4d60-875d-bb7dd2098ce9.png
Second case, variant 2:
|
|
The backend address actually requested:
127.0.0.1:9000/minio/ucenter/imgs/885058fa-dff6-4d60-875d-bb7dd2098ce9.png
Conclusion: a trailing slash on
proxy_pass
strips the
location
path prefix; without it, the
location
prefix is preserved.