Once your server is up and running or perhaps its not running you can use following commands in order to start, stop or restart server.

To stop your web server, type:

sudo systemctl stop nginx

To start the server again Type:

sudo systemctl start nginx

If you want to restart the server the please type:

sudo systemctl restart nginx

If you don’t wish to drop the connection just want to reload the configuration after making configurations please do following command:

sudo systemctl reload nginx

If you don’t want nginx by default when server starts you can disable this behavior by typing following command:

sudo systemctl disable nginx

Probably you did above action for testing accidentally you can revert back default behavior of starting nginx when server starts by doing following command:

 sudo systemctl enable nginx 
(Visited 15 times, 1 visits today)