Ubuntu Linux: Start / Restart / Stop Nginx Web Server

by on January 1, 2011 · 1 comment· LAST UPDATED December 1, 2012

in

How do I restart / stop / start the nginx web server under Ubuntu Linux operating systems?

Tutorial details
DifficultyEasy (rss)
Root privilegesYes
Requirementssudo
nginx
Estimated completion timeN/A

The nginx web server can be restarted using any one of the following command line syntax:

sudo service nginx restart

OR

sudo /etc/init.d/nginx restart

The same commands can be used to start / stop the nginx server:

 
sudo service nginx start
sudo service nginx stop
sudo service nginx restart
 

OR

 
sudo /etc/init.d/nginx start
sudo /etc/init.d/nginx stop
sudo /etc/init.d/nginx restart
 

It is also possible to use the following syntax:
sudo nginx -s reload

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 1 comment… read it below or add one }

1 Thanh Nguyen July 21, 2014 at 4:33 pm

Hi. i just use command: sudo service nginx restart but i get an error
* Restarting nginx nginx [fail]
Please help me how to solve? thanks

Reply

Leave a Comment

Tagged as: , , , ,

Previous Faq:

Next Faq: