啓動代碼格式:nginx安裝目錄地址 -c nginx配置文件地址nginx
例如:3d
[root@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nginx的中止有三種方式:code
一、查看進程號blog
[root@LinuxServer ~]# ps -ef|grep nginx
二、殺死進程進程
[root@LinuxServer ~]# kill -QUIT 2072
一、查看進程號class
[root@LinuxServer ~]# ps -ef|grep nginx
二、殺死進程test
[root@LinuxServer ~]# kill -TERM 2132
或 [root@LinuxServer ~]# kill -INT 2132
[root@LinuxServer ~]# pkill -9 nginx
看到以下顯示nginx.conf syntax is ok配置
nginx.conf test is successfulgrep
說明配置文件正確!方法