1. Start
cd usr/local/nginx/<span>sbin .</span>/nginx
2. Restart
Change the configuration and restart nginx
Query nginx main process number ps -ef | grep nginx Stop gracefully kill -QUIT main process number Quick stop kill -TERM main process numberForce stop kill -9 nginx
If nginx.conf is configured with the pid file path, if not, then In the logs directory kill -Signal type '/usr/local/nginx/logs/nginx.pid'Four. Upgrade 1. First replace the old program file with the new program 2. Kill -USR2 old version program The main process number or process file name At this time, the old nginx main process will rename its process file to .oldbin, and then execute the new version of nginx. At this time, the new and old versions will run at the same time 3. Kill -WINCH the old version of the main process No. 4. Start the new/old worker process without reloading the configuration kill -HUP Old/new version main process number Close the old/new process gracefully kill -QUIT Old/new process number Quickly close the old /New process kill -TERM old/new process numberThe above introduces the startup, restart, and shutdown of nginx, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.