The nginx restart command under Linux is: "kill -HUP nginx process number". Restart method: First find the current nginx process number, and then enter the command "kill -HUP process number" to restart the nginx service.
Startup code format: nginx installation directory address -c nginx configuration file address
For example:
[root@LinuxServer sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
There are three ways to stop nginx:
[root@LinuxServer ~]# ps -ef|grep nginx
[root@LinuxServer ~]# kill -QUIT 2072
[root@LinuxServer ~]# ps -ef|grep nginx
[root@LinuxServer ~]# kill -TERM 2132
或 [root@LinuxServer ~]# kill -INT 2132
[root@LinuxServer ~]# pkill -9 nginx
##Related recommendations: "
Linux Operation and MaintenanceThe above is the detailed content of What is the nginx restart command under linux?. For more information, please follow other related articles on the PHP Chinese website!