nginx菜鸟教程二
--查看ngix是否在運行
[root@localhost sbin]# ps aux|grep nginx
root ? ? ? 953 ?0.0 ?0.0 ? 3492 ? 516 ? ? ? ? ?Ss ? 07:09 ? 0:00 nginx: master process ./nginx
nobody ? ? 954 ?0.0 ?0.0 ? 3676 ? 876 ? ? ? ? ?S ? ?07:09 ? 0:00 nginx: worker process
root ? ? ? 967 ?0.0 ?0.0 ? 4356 ? 724 pts/2 ? ?S+ ? 07:12 ? 0:00 grep nginx
--其中master為主進程
--其中worker真正工作者
--殺掉nginx進程
--nginx的信號控制
--------------------------------------------------
TERM,INT | Quick ShutDown
---------------------------------------------------
QUIT ? ? | Graceful shutdown 優雅的關閉進程,即等請求結束后再關閉
---------------------------------------------------
HUP ? | Configuration reload,Start the new worker processes with a new configuration Gracefully shutdown the old worker process
? ? ? ? ?| 改變配置文件,平滑的重讀配置文件
----------------------------------------------------
USR1 ? ? | Reopen the log files 重讀日志,在日志按月/日分割時有用
----------------------------------------------------
USR2 ? ? | Upgrade Executable on the fly 平滑的升級
----------------------------------------------------
WINCH ? ?| Gracefully shutdown the woreker processes 優雅的關閉舊的進程(配合USR2來進行升級)
-----------------------------------------------------
kill -INT (進程號)
kill -HUP (進程號)
kill -USER1 (進程號)(日志切割)
--touch ./logs/access.log
kill -信號控制 'cat logs/nginx.pid(等于進程號)'
轉載于:https://my.oschina.net/u/993551/blog/345751
總結
以上是生活随笔為你收集整理的nginx菜鸟教程二的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C# 阳历转农历
- 下一篇: [附源码]SSM计算机毕业设计游戏装备交