If your nginx configuration file is in /etc/nginx/nginx.conf,启动nginx就可以nginx -c /etc/nginx/nginx.conf
nginx signal
nginx -s is to send a signal to nginx nginx -s stop to stop immediately nginx -s quit to stop gracefully nginx -s reload to reread the configuration file
Just start and run nginx directly, no need to add signal
There is no need to add the -s parameter, -s is a signal, and reload is to reload the configuration file.
Start nginx
If your nginx configuration file is in
/etc/nginx/nginx.conf
,启动nginx就可以nginx -c /etc/nginx/nginx.conf
nginx signal
nginx -s is to send a signal to nginx
nginx -s stop to stop immediately
nginx -s quit to stop gracefully
nginx -s reload to reread the configuration file
Delete the pid file in the corresponding directory, and then nginx start
Execute the following command
First, kill the started nginx process, and then directly execute the
nginx
command to restart nginx.