To stop a Nginx server or service, we can use the systemctl
command-line utility followed by the stop nginx
command in Linux.
# Stops Nginx service
sudo systemctl stop nginx
What is systemctl
?
- The
systemctl
is a command-line utility that is used to control and manage thesystemd
services. - It is widely used with web server services like Nginx, Apache, etc.