日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

nginx停止,平滑重启命令

發布時間:2023/12/3 编程问答 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 nginx停止,平滑重启命令 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

TERM, INT 快速關閉;

QUIT 從容關閉;

HUP 平滑重啟,重新加載配置文件;

USR1 重新打開日志文件,在切割日志時用途較大;

USR2 平滑升級可執行程序;

WINCH 從容關閉工作進程;


【荔枝】

[root@localhost nginx]# nginx -c conf/nginx.conf [root@localhost nginx]# [root@localhost nginx]# ps -ef | grep nginx root 2138 1 0 06:30 ? 00:00:00 nginx: master process nginx -c conf/nginx.conf nobody 2139 2138 0 06:30 ? 00:00:00 nginx: worker process nobody 2140 2138 0 06:30 ? 00:00:00 nginx: worker process nobody 2141 2138 0 06:30 ? 00:00:00 nginx: worker process root 2143 2083 1 06:30 pts/0 00:00:00 grep nginx [root@localhost nginx]# [root@localhost nginx]# ps -ef | grep nginx root 2138 1 0 06:30 ? 00:00:00 nginx: master process nginx -c conf/nginx.conf nobody 2139 2138 0 06:30 ? 00:00:00 nginx: worker process nobody 2140 2138 0 06:30 ? 00:00:00 nginx: worker process nobody 2141 2138 0 06:30 ? 00:00:00 nginx: worker process root 2147 2083 3 06:32 pts/0 00:00:00 grep nginx [root@localhost nginx]# [root@localhost nginx]# kill -QUIT 2138 [root@localhost nginx]# [root@localhost nginx]# ps -ef | grep nginx root 2149 2083 2 06:32 pts/0 00:00:00 grep nginx


【nginx.conf 文件如下】: 第2行的 woker_processes 3; 表示nginx主進程 帶有3個工作進程;

# this config is from 3-6 worker_processes 3; events {worker_connections 1024; } http {# first virtual host 第一個虛擬主機server{# ip and port monitored 監聽的ip和端口listen 192.168.186.100:80;# host name 主機名稱server_name 192.168.186.100;# the dir access_log saved 訪問日志文件存放路徑access_log logs/server1.access.log combined;location /{# default index file, priority reduction from left to right# 默認首頁文件,順序從左到右,index index.html index.htm;# the dir html file saved, html網頁文件存放目錄root /data0/htdocs/server1;}}# second virtual hostserver{listen 192.168.186.101:80;server_name 192.168.186.101;access_log logs/server2.access.log combined;location /{index index.html index.htm;root /data0/htdocs/server2;}}# third virtual hostserver {listen 192.168.186.102:80;server_name 192.168.186.102;access_log logs/server3.access.log combined;location /{index index.html index.htm;root /data0/htdocs/server3.com;}} }

創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的nginx停止,平滑重启命令的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。