Controlled with signals:
Master process:
term, INT fast shutdown
QUITGraceful shutdown
HUPChanging configuration, keeping up with a changed time zone (only for FreeBSD and Linux), starting new worker Processes with a new configuration, graceful shutdown of the old worker processes
USR1re-opening log files
USR2Upgrading an executable file
WINCHGraceful shutdown of worker processes
Worker process:
term, intfast shutdown
QUITGraceful shutdown
USR1re-opening log files
WINCHAbnormal termination for debugging (requires debug_points to be enabled)
Changing Configuration (FreeBSD 4.x)
PS Axw-o Pid,ppid,user,%cpu,vsz,wchan,command | Egrep ' (nginx| PID) '
Rotating Log-files
In order to rotate log files, they need to be renamed first. After that USR1 signal should is sent to the master process.
Upgrading executable on the Fly
In order to upgrade the server executable, the new executable file should is put in place of a old file first. After that USR2 signal should is sent to the master process.
/usr/local/nginx/logs/nginx.pid.oldbin
Nginx (3)-controlling nginx