This guide will walk you through the commands to start, stop, and restart Nginx on your server. Note that the commands vary depending on whether your system uses “systemctl (Systemd)” or “service (SysVinit).” Check your server’s configuration to determine which one applies to you.
Let us follow the guide:
Using Systemctl (Systemd)
If your server uses systemctl, use these commands to manage Nginx:
- Start Nginx:
sudo systemctl start nginx
- Stop Nginx:
sudo systemctl stop nginx
- Restart Nginx:
sudo systemctl restart nginx
Using SysVinit (service)
For servers using SysVinit, use the following commands:
- Start Nginx:
sudo service nginx start
- Stop Nginx:
sudo service nginx stop
- Restart Nginx:
sudo service nginx restart
In this manner, NGINX on your server starts, stops, and restarts. Depending on your system, you may use any of the above commands. However, if you encounter any issues, contact our support staff.
Need to clear cached content? Check out How to Clear Nginx Cache for User from WHM