Network
The nginx command
Nginx web server. With -t it checks the config and with -s reload it reloads without downtime.
Most useful options
-tChecks the config-s reloadReloads without downtimeCopy-ready examples
$ sudo nginx -tCheck the configYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- Sites live in /etc/nginx/sites-available (server, server_name, root).
FAQ
Does nginx -t change anything?
No, it only checks; to apply changes use nginx -s reload.
More Network commands
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course