nginx - small, but very powerful and efficient web server
nginx [-t | -T | -s signal | -v]
Options you will use
-t- test the configuration (and the certificates and keys it references)
-T- test and dump the full configuration
-s reload- tell the running master to re-read its configuration
-v / -V- version / build options
-g DIRECTIVES- Global directives on the command line: -g 'daemon off;' keeps nginx in the foreground (containers).
-t- Test the configuration and exit.
-s SIGNAL- Send a signal to the master: reload, stop, quit, reopen.
Examples
$ sudo nginx -t && sudo systemctl reload nginxthe only safe order
Gotchas
- A reload with a broken configuration keeps the old one running and logs [emerg] to error.log - the change silently did not happen.
- proxy_read_timeout defaults to 60s: a slower upstream becomes a 504.
Try nginx in a real terminal Free, in your browser - a real Ubuntu terminal to try it in, with missions that check your work.