https://www.cnblogs.com/codingcloud/p/5095066.htmlhtml
啓動
啓動代碼格式:nginx安裝目錄地址 -c nginx配置文件地址nginx
例如:spa
[root@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
中止
nginx的中止有三種方式:3d
-
從容中止
一、查看進程號code
[root@LinuxServer ~]# ps -ef|grep nginx
二、殺死進程htm
[root@LinuxServer ~]# kill -QUIT 2072
-
快速中止
一、查看進程號blog
[root@LinuxServer ~]# ps -ef|grep nginx
二、殺死進程進程
[root@LinuxServer ~]# kill -TERM 2132
或 [root@LinuxServer ~]# kill -INT 2132
-
強制中止
[root@LinuxServer ~]# pkill -9 nginx
重啓
一、驗證nginx配置文件是否正確
方法一:進入nginx安裝目錄sbin下,輸入命令./nginx -t
看到以下顯示nginx.conf syntax is okclass
nginx.conf test is successfultest
說明配置文件正確!