When configuring proxy_pass in nginx, adding a trailing slash (/) to the destination URL makes it an absolute root path. In this case, nginx will not pass the path segment matched in the location directive to the proxy. If no trailing slash is present, the matched path segment will be passed along as well.

Let’s use a test file named test.html and access http://127.0.0.1/proxy/test.html. The two scenarios below forward the request to different addresses with different results.
Scenario 1:
location /proxy/ {
proxy_pass http://192.168.0.100/;
}
After nginx matches /proxy/, the remaining part is proxied to the URL http://192.168.0.100/test.html
Scenario 2 (compared to Scenario 1, the trailing slash is missing):
location /proxy/ {
proxy_pass http://192.168.0.100;
}
After nginx matches /proxy/, the remaining part is proxied to the URL http://192.168.0.100/proxy/test.html