Nginx Config Check
Honest note: a browser cannot test the nginx config on your server. This tool generates the correct
nginx -tcommand + common-error lookup — run it on your server for the real result. No fake "click-to-test" promise here.
Generate the test command
Enter a config path to get the test and dump commands.
Common-error lookup
| Error | Cause | Fix |
|---|---|---|
unknown directive |
Typo or module not loaded | Check spelling; nginx -V for the module compile flag |
directive is not allowed here |
Wrong context | http / server / location nesting — move to the right block |
host not found in upstream |
Upstream DNS resolution failed | dig to confirm; use the IP or fix DNS |
emerg bind() failed |
Port in use | ss -tlnp \| grep :80 to find the holder |
conflicting server name |
Duplicate server_name | Two server blocks share a name — merge or rename |
"upstream" directive is not allowed here |
Upstream in wrong block | upstream belongs at http level, not inside server |
Related tutorials
- Nginx reverse proxy 502/504 troubleshooting — troubleshooting after a config change breaks