Demo: test Nginx location precedence
Nginx location matching is subtle. A tester helps explain which exact, prefix, ^~, or regex block handles a URL before the config reaches production.
- Test real request paths, not only abstract patterns.
- Compare regex locations with ^~ prefix locations.
- Check fallback / behavior for single-page apps.
location = /health { return 200; }
location ^~ /assets/ { root /var/www; }
location ~ \.php$ { fastcgi_pass php; }
location / { proxy_pass http://app; }