sudo nginx -t

Category: Self-Hosting

sudo nginx -t

Test all Nginx config files for syntax errors before applying — always run this before reloading

Dry-run test that parses every Nginx config file and reports any syntax errors. Always run this before reloading — a bad config can take your whole server offline.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.