How to start, stop, and restart Nginx

November 11, 2024 / cPanel & WHM

This guide will walk you through the commands to start, stop, and restart Nginx on your server. If you’re managing NGINX on a live production environment, using managed VPS hosting can help avoid downtime and ensure your server is always optimised and monitored.

Let us follow the guide:

Using Systemctl (Systemd)
If your server uses systemctl, use these commands to manage Nginx:

  1. Start Nginx:
    sudo systemctl start nginx
  2. Stop Nginx:
    sudo systemctl stop nginx
  3. Restart Nginx:
    sudo systemctl restart nginx

Using SysVinit (service)
For servers using SysVinit, use the following commands:

  1. Start Nginx:
    sudo service nginx start
  2. Stop Nginx:
    sudo service nginx stop
  3. 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.

Managing Nginx services and Linux web servers?
A Linux VPS Hosting solution provides full root access and the flexibility needed to manage Nginx, server configurations and website performance.

Need to clear cached content? Check out How to Clear Nginx Cache for User from WHM

Spread the love