Paste your nginx.conf and get instant, line-by-line findings: unbalanced braces, missing semicolons, directive typos with fix suggestions, illegal nesting, and risky patterns like if inside location or the alias trailing-slash bug.
100% client-sideconfig never leaves your browserno signupline numbers + severity
nginx.conf input
1
findings
What the linter checks
Around thirty heuristic rules across three groups. Errors would fail nginx -t; warnings are likely bugs or security smells; info notes are worth knowing.
ERROR Unbalanced braces
Unclosed { blocks and stray } — with recovery so the rest of your config is still analyzed.
ERROR Missing semicolons
Simple directives never terminated with ;, reported at the exact line, without false positives on multi-line directives.
ERROR Illegal nesting & context
server inside location, upstream inside server, listen outside server, worker_connections outside events, alias outside location and more.
ERROR Directive typos
Unknown directives are spell-checked against 150+ real nginx directives — server_names suggests server_name. Genuinely unknown names stay a warning (they may be third-party modules).
ERROR Alias path traversal
location /static/ paired with alias /var/www/static (missing trailing slash) lets requests escape the intended directory.
ERROR Bad location patterns
Invalid modifiers (=~~*^~ are the only ones), missing match patterns, malformed if conditions.
WARNif inside location
The famous “if is evil”: content handlers inside or around if execute in surprising order. Only return/rewrite/set is the safe subset.
WARN listen 443 without ssl
Binding port 443 without the ssl parameter means TLS is never negotiated. Also flags the deprecated ssl on;.
WARN Duplicate single-value directives
Two root or two server_name lines in one block — nginx rejects duplicates of single-value directives.
WARN add_header redefinition
add_header in a location replaces every header inherited from the server block instead of merging — headers silently vanish.
WARN proxy_pass pitfalls
Variables in proxy_pass without a resolver; a URI path in proxy_pass inside a regex location (surprising replacement semantics).
WARN Host header spoofing
proxy_set_header Host $http_host; forwards the raw client header — $host is almost always what you want.
WARN $uri in redirects
return 301 …$uri can enable CRLF/header injection — use $request_uri instead.
WARN Unsafe defaults
server_tokens on (version disclosure), autoindex on (directory listing), allow without deny all, valid_referers none.
INFO Worth knowing
Missing events block, server block without listen, unanchored regex locations, named locations, and a reminder that include files are not resolved.
Honest limitations
Not a replacement for nginx -t. The real binary resolves every include, validates against your compiled modules, and evaluates variables at runtime. This tool is a heuristic pre-check — fast, but approximate.
include files are not resolved. Directives living in included files are not linted. For full coverage, paste the output of nginx -T (the merged dump) instead.
Unknown directives are warnings, not errors, because third-party modules (lua, headers-more, brotli …) add legitimate directives this tool cannot know about.
How it compares
Different tools answer different questions. Here is an honest map.
Capability
This linter
GetPageSpeed checker
Gixy (CLI)
nginx -t
Runs 100% in your browser
Yes
No (server-side)
No (local install)
No (needs server)
Config leaves your machine
Never
Uploaded for analysis
Never (runs locally)
Never
Install / signup required
Neither
Neither
pip install
Server access
Typo suggestions for directives
Yes
No
No
No
Missing semicolons, brace balance
Yes
Yes
Syntax only
Yes
Security-focused audit (SSRF, traversal…)
Heuristic subset
Gixy-powered
Deep (25+ plugins)
None
Resolves include files
No
No
Yes
Yes
Frequently asked questions
It statically analyzes your nginx.conf text for: unbalanced braces, missing semicolons, directives used in the wrong context (e.g. a server block inside a location), duplicate single-value directives, typos in directive names with correction suggestions, listen/server_name problems (such as port 443 without ssl), invalid location modifiers, the famous "if is evil" pattern, alias path-traversal bugs, proxy_pass pitfalls (missing resolver, URI in regex locations), add_header redefinition, version disclosure via server_tokens, and unsafe patterns like autoindex on or allow without deny all. Every finding carries a severity and the exact line number.
No — and any tool that claims to fully replace it is overselling. nginx -t parses with the real nginx binary, resolves every include file, and validates against the exact modules you compiled in. This linter is a heuristic pre-check: it cannot resolve include files, cannot know which third-party modules you have installed, and cannot evaluate variables at runtime. Use it to catch mistakes early (especially typos and nesting errors) before you deploy, then still run nginx -t on the server before reloading.
Because nginx's if is not a general-purpose conditional — it is part of the rewrite module and executes at an unexpected phase of request processing. Content handlers such as proxy_pass, try_files, or alias inside (or next to) an if can run in a surprising order, silently misrouting requests. The nginx wiki documents this under "IfIsEvil". The only reliably safe use of if is a block containing nothing but return, rewrite, or set directives — for anything more complex, use the map directive or separate location blocks. This linter flags every if inside a location and explains the safe subset.
No. All parsing and analysis run 100% locally in your browser with JavaScript — there are zero network requests, no file uploads, and no analytics payloads carrying your config. This matters because nginx configs often contain secrets: upstream credentials, internal hostnames, IP allowlists, and TLS details. Server-side checkers require you to upload all of that; here it never leaves your machine.
When a location ends with a slash but its alias does not (or vice versa), nginx concatenates paths in a way that escapes the intended directory. For example, location /static/ with alias /var/www/static (no trailing slash) maps a request for /static/../secret.txt outside /var/www/static — a classic path-traversal vulnerability. The fix is simple: end both the location and the alias with a slash, or neither. This linter flags the mismatch as an error.
$http_host is the raw Host header exactly as the client sent it, so trusting it lets attackers poison caches, password-reset links, and virtual-host routing (host-header attacks). $host is nginx's normalized, lowercased server name with the port stripped, and falls back to the matching server_name — it is almost always what you want to forward upstream. The linter suggests replacing $http_host with $host.
Treat it as a to-do, not a verdict. If you recognize the directive as belonging to a module you compiled in (e.g. headers-more, lua, brotli), you can safely ignore the warning. If you do not use any third-party modules, it is almost certainly a typo — check whether the linter suggested a similarly-spelled built-in directive, which would fail nginx -t with an "unknown directive" emergency error.
Three practical differences. First, privacy: those tools analyze your config on their servers (GetPageSpeed even offers piping nginx -T into their endpoint), while this linter runs entirely in your browser. Second, scope: Gixy is a security-focused static analyzer you install via pip; this tool additionally catches plain authoring mistakes — typos with suggestions, missing semicolons, illegal nesting, duplicate directives. Third, access: no signup, no install, works offline once loaded. For deep security auditing, Gixy remains the specialist; for fast pre-deploy sanity checks, this is the quicker loop.
Need to generate redirects instead of linting? Our companion tool builds copy-paste 301/302 redirect blocks for nginx.
We use cookies and third-party services (including Google AdSense) to personalize content, analyze traffic, and serve relevant ads. By clicking "Accept", you consent to our use of cookies as described in our Privacy Policy.
Report an issue
2 taps, no typing needed — diagnostics are sent automatically.