nginx Config Analyzer
Parse an nginx config, resolve its server and location blocks, and flag issues.
- Your draft is kept in this tab's session storage and cleared when the tab closes.
Draft kept in this tab
Your draft is kept in this tab's session storage and cleared when the tab closes. - Processing happens in this page. No application server receives your input.
Runs in your browser
Processing happens in this page. No application server receives your input.
nginx configuration
Block structure
- Targets
- nginx 1.27
- Servers
- โ
- Locations
- โ
- Upstreams
- โ
- Includes not followed
- โ
Route tester
Locations
| Server | Modifier | Pattern | Handler | Precedence |
|---|---|---|---|---|
| No rows. | ||||
Findings
Findings are listed once the configuration has been read.
What This Tool Analyzes
Parses an nginx configuration into its block tree, lists every server and its location blocks, and evaluates which server and location block nginx 1.27 selects for a given URL along with the winning precedence step and candidate outcomes.
Target specification: nginx 1.27
Scope & Evaluation Limits
It does not follow include: every include is listed as a reference that was not resolved, and the header counts them, because a route decision made without conf.d/*.conf can be confidently wrong. Variables ($host, $1, a set directive) are shown as written and never interpolated, so a proxy_pass containing one is reported without a resolved target. The route tester models server selection and location precedence as documented in nginx 1.27; it does not model rewrite, try_files, if, or error_page re-entry, all of which can send a request somewhere else after a location is chosen: the tester says which location nginx enters, not where the request finally lands. Only the directive set below is validated for context; anything else is info. No module awareness: a directive from a third-party module reads as unknown.
- Following include directives to external files
- Runtime variable interpolation ($host, $1, set)
- Post-location rewrite, try_files, if, or error_page re-entry
Lint Rules (10)
| Rule | Severity | Fires when |
|---|---|---|
NGINX/wrong-context | error | A directive in a block it is not valid in โ location at http level, proxy_pass at server level |
NGINX/duplicate-location | error | Two locations in one server with the same modifier and pattern. The second is unreachable |
NGINX/proxy-no-host-header | warning | proxy_pass in a location with no proxy_set_header Host. The upstream sees nginx's own name and virtual hosting breaks |
NGINX/proxy-no-forwarded-for | warning | proxy_pass with no X-Forwarded-For or X-Real-IP. Every request reaches the app from the proxy's address |
NGINX/ssl-protocols-old | warning | ssl_protocols including SSLv3, TLSv1, or TLSv1.1 |
NGINX/root-in-location | warning | root inside a location that also has an alias, or a root whose path ends with the location prefix โ the classic double-path 404 |
NGINX/alias-no-slash | warning | An alias whose trailing slash does not agree with its location's. The documented path-traversal footgun |
NGINX/no-server-tokens-off | info | server_tokens not set to off at any level |
NGINX/server-name-underscore | info | server_name _;, which is not a wildcard โ it is an invalid name that can never match, used deliberately as a catch-all only in combination with default_server |
NGINX/include-not-followed | info | One per include, so the count in the header has rows behind it |
Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.