Paste a nginx server { } block or a list of location directives. Location blocks will be parsed and loaded automatically.
Enter one URI per line. Each will be matched against the current location blocks.
Generates a ready-to-paste nginx server { } block from your current location blocks.
| Priority | Modifier | Behavior |
|---|---|---|
| 1st | = | Exact match. If the full URI matches exactly, this block wins immediately. NGINX stops searching. |
| 2nd | ^~ | Preferential prefix. Among all prefix matches, if the longest one uses ^~, NGINX wins this block and skips regex evaluation entirely. |
| 3rd | ~ / ~* | Regex (case-sensitive / case-insensitive). Evaluated in declaration order. The FIRST matching regex wins. Halts further evaluation. |
| 4th | (none) | Standard prefix. The longest matching prefix wins, but only if no regex matched first. Regex is always tried before fallback to this. |
⚠️ IMPORTANT DISCLAIMER: The tools and scripts on this site are provided "AS IS" for educational purposes.
Review destructive commands before executing. By using this site, you assume all risk and agree to our Full Terms of Service.