Distribution-specific startup scripts

On Ubuntu, Debian, and RHEL, the startup script automates the preceding control sequences. By using the startup script, you don't need to remember the exact sequence of the commands and signal names. The following table illustrates the use of the startup script:

Command

Equivalent to

service nginx start

sbin/nginx

service nginx stop

TERM, wait 30 seconds, then KILL

service nginx restart

service nginx stop and service nginx start

service nginx configtest

nginx -t <config file>

service nginx reload

service nginx configtest and HUP

service nginx rotate

USR1

service nginx upgrade

USR2 and QUIT to the old master

service nginx status

show status of the instance

Get Nginx Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.