Home >Operation and Maintenance >Nginx >What are the methods to stop nginx service?
There are four ways to stop the nginx service, as follows:
1. Stop the service calmly
This method is relatively mild and requires the process to be completed. Stop the service after the current work. The command is as follows:
nginx -s quit
2. Stop the service immediately
This method is tougher. No matter whether the process is working or not, the process is stopped directly. The command is as follows:
nginx -s stop
3. Stop systemctl
systemctl is a Linux command. The specific command is as follows:
systemctl stop nginx.service
4. The killall method kills the process
Kill the process directly. This method is generally used when the above methods are invalid. The specific command is as follows:
killall nginx
Recommended tutorial: nginx usage tutorial
The above is the detailed content of What are the methods to stop nginx service?. For more information, please follow other related articles on the PHP Chinese website!