Nginx first checks exact matches, remembers the longest matching prefix, may stop on ^~, then tests regular expressions in configuration order. If no regex wins, it returns to the remembered prefix.
The parser accepts one server block or a flat list of locations using =, ^~, plain prefixes, ~, and ~*. It deliberately rejects nested and named locations, and browser regular expressions cannot reproduce every PCRE feature used by Nginx.
Parsing and matching happen entirely in the browser. No Nginx process runs, no request is sent, and pasted hostnames, paths, or internal configuration stay on your device.
Common questions and answers about this topic.
Paste one server block or a flat set of location directives, enter a URI beginning with /, and read the five-step trace. The selected rule and every skipped or continued stage update as you edit.
Only regex locations depend directly on configuration order: the first matching regex wins. Exact and prefix locations follow their own rules, including exact-match priority and longest-prefix selection.
^~ is still a prefix location. If it is the longest matching prefix, Nginx selects it without checking regex locations. A shorter ^~ prefix does not beat a longer matching plain prefix.
Nginx tests regex locations in the order they appear and stops at the first match. Reordering two overlapping regex locations can therefore change the selected configuration.
No. It models one server block with flat locations and common =, ^~, prefix, ~, and ~* behavior. It does not execute directives, nested or named locations, rewrite or try_files redirects, or every PCRE feature.
The parser runs entirely in your browser and does not upload the configuration or send the test request. Still review your organization's screen-sharing, clipboard, and device policies before handling sensitive configuration.