Controlling nginx

Controlling nginx

nginx can be controlled with signals. The process ID of the master process is written to the file /usr/local/nginx/logs/nginx.pid by default. This name may be changed at configuration time, or in nginx.conf using the pid directive. The master process supports the following signals:

TERM, INT fast shutdown
QUIT graceful shutdown
HUP changing configuration, keeping up with a changed time zone (only for FreeBSD and Linux), starting new worker processes with a new configuration, graceful shutdown of old worker processes
USR1 re-opening log files
USR2 upgrading an executable file
WINCH graceful shutdown of worker processes

Individual worker processes can be controlled with signals as well, though it is not required. The supported signals are:

TERM, INT fast shutdown
QUIT graceful shutdown
USR1 re-opening log files
WINCH abnormal termination for debugging (requires debug_points to be enabled)
doc_nginx
2017-02-09 07:05:46
Comments
Leave a Comment

Please login to continue.