Updating to a new nginx binary on the flyEdit
This is described on the official wiki at:
Basically it boils down to the following:
Get PID of old master process by inspecting output of ps
:
$ ps auxwww | grep nginx
(You could also just cat /var/run/nginx.pid
.)
Now, install the new binary:
$ sudo make install
Advise old master process to start a new master process using the updated binary:
$ sudo kill -s USR2 2941
Gracefully shut down old worker processes:
$ sudo kill -s WINCH 2941
Gracefully exit old master process:
$ sudo kill -s QUIT 2941
See the official wiki for more info on how to do other things like backing out of an update.