nginx location, the latter with and without proxy_pass url / distinction

location /test {
	proxy_pass http://127.0.0.1:8888;
}

location /test/ {
	proxy_pass http://127.0.0.1:8888/;
}

LOCATION:
LOCATION fuzzy matching is performed

Without the test /
said they would intercept such as / test / test01 / testxxxxx this type of request, as long as the test is the beginning of the request will be intercepted

proxy_pass:
When proxy_pass, when added in a later url /, the root corresponding to an absolute path, not the nginx location matching agent walking path portion; if not / will match the path portion may also go to the agent .

Additional

By this method POST data will disappear, because the equivalent of a get request to re-launch

Published 48 original articles · won praise 56 · views 20000 +

Guess you like

Origin blog.csdn.net/zhetmdoubeizhanyong/article/details/100127349