If you have an up and running Nginx server on your device and want to stop it, lets see some of the ways you can stop it,
- Using systemctl command:
# systemctl stop nginx# sudo systemctl stop nginx - Using service command:
# service stop nginx * Stopping nginx nginx [OK]# sudo service stop nginx - Using nginx stop command:
# nginx -s stopx# sudo service nginx -s stopNote if the service is already stopped, you would see the below message, else the command will return to the prompt.
# nginx -s stop nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!