Web Tools
Nginx Location Tester
Test which nginx location block matches a given URI. Supports exact, prefix, regex, and case-insensitive matching with correct nginx priority ordering. Runs entirely in your browser — your data never leaves your machine.
nginx location server regex web-server
Published June 1, 2026
All interactive tools run entirely in your browser. Your data never leaves your device.
How It Works
Enter your nginx location blocks (one per line) and a test URI. The tool evaluates all locations using nginx’s priority rules and shows which one wins. Each location is highlighted with its match status.
Features
- All modifier types: exact (
=), stop-regex prefix (^~), regex (~), case-insensitive regex (~*), and plain prefix - Correct priority: follows nginx’s actual matching algorithm — exact first, then longest prefix with ^~ check, then regex order, then longest prefix fallback
- Visual results: winner highlighted in green, other matches in blue, non-matches dimmed
- Match explanation: human-readable explanation of why the winning location was selected
- 5 examples: common nginx location patterns and edge cases
- Private: runs entirely in the browser — your data never leaves your machine
Use Cases
- Debugging nginx configuration before deploying
- Understanding nginx location priority rules
- Testing regex patterns against specific URIs
- Teaching nginx location matching to team members