nginx: check location order before proxy_pass
When a request is routed to the wrong place, inspect exact, prefix, and regex locations in the effective config first.
sudo nginx -T | sed -n '/server_name example.com/,/}/p'
curl -I http://127.0.0.1/some/path
Verify the result
The test URL should hit the expected block and return predictable headers.