启动代码格式: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
二、杀死进程blog
[root@LinuxServer ~]# kill -QUIT 2072
一、查看进程号进程
[root@LinuxServer ~]# ps -ef|grep nginx
二、杀死进程class
[root@LinuxServer ~]# kill -TERM 2132
或 [root@LinuxServer ~]# kill -INT 2132
[root@LinuxServer ~]# pkill -9 nginx
看到以下显示nginx.conf syntax is oktest
nginx.conf test is successful配置
说明配置文件正确!grep