Advertisement

Free Online Nginx Configuration Validator

Check Nginx configuration syntax and common issues.

Waiting for input
Server blocks
0
Detected server contexts
Errors
0
Syntax-level problems
Warnings
0
Review recommended
Advertisement

About the Nginx Configuration Validator

Nginx configuration is a tree of contexts and directives. A missing semicolon, an unbalanced brace, or a misspelled directive can prevent the service from reloading, while a logically valid file can still expose the wrong site or accept uploads larger than the application expects. This validator performs a syntax-level review in the browser. It is designed to catch the mistakes that are easy to introduce by hand and hard to spot in a long configuration file.

The scanner walks the text character by character, tracking single quotes, double quotes, comments, braces, and semicolons. That makes it more reliable than a line-by-line check, because quoted strings may contain braces or semicolons that must be ignored. When a closing brace appears with unprocessed text before it, the tool reports a missing semicolon and gives the line number. It also reports negative nesting, unclosed braces at end of file, and unterminated quotes. These are the failures that nginx -t usually reports first.

After the structural pass, the tool locates server blocks and inspects their directives. It checks for a listen directive, a server_name, and either a document root, an alias, or a proxy_pass. It reports duplicate server names, a wildcard catch-all name, a TLS certificate without an SSL listener, a listener on port 443 without the SSL flag, and a proxy pass without a forwarded Host header. The client_max_body_size directive is checked because its default of one megabyte often breaks file uploads in ways that only appear in production.

The results are advisory. A valid configuration may deliberately omit a server name, rely on a global client_max_body_size, or use an include file that this tool cannot see. Nginx also has many modules whose directives are unknown here. Always run nginx -t on the target server before reloading, and keep a tested backup of the previous configuration. The validator never connects to a server and never sends your configuration anywhere; everything is parsed locally.

How to use this tool

  1. Paste a full nginx.conf or a single site configuration.
  2. Click Check configuration.
  3. Fix structural errors first, then review the server-level warnings.
  4. Copy or download the report and compare it with nginx -t output.

Frequently asked questions

Is this a replacement for nginx -t?

No. nginx -t is authoritative. This tool performs static checks and cannot load modules, resolve includes, or validate every directive.

Why does an include file cause warnings?

Directives inside an included file are not visible in the pasted text. The validator only sees what you paste, so some global settings may appear missing.

Does it check SSL certificate files?

No. It only checks whether certificate directives and SSL listeners are consistent in the text. File existence and certificate validity must be verified on the server.

Sponsored
Find a bug? Report now