February 2018
Beginner to intermediate
348 pages
9h 40m
English
You can start Nginx by running the Nginx binary without any switches. If the daemon is already running, a message will show up indicating that a socket is already listening on the specified port:
[emerg]: bind() to 0.0.0.0:80 failed (98: Address already in use) [...] [emerg]: still could not bind().
Beyond this point, you may control the daemon by stopping it, restarting it, or simply reloading its configuration. Controlling is done by sending signals to the process using the nginx -s command:
|
Command |
Description |
|
nginx -s stop |
Stops the daemon immediately (using the TERM signal) |
|
nginx -s quit |
Stops the daemon gracefully (using the QUIT signal) |
|
nginx -s reopen |
Reopens log files |