Friday, March 20, 2015

Remove nginx and re activate apache

Remove nginx and re activate apache

 
//First, you need to stop nginx so it releases port 80 so that apache2 can listen to it later on.
-------------------------------------
sudo service nginx stop                                                           

//Next, if nginx was installed with apt-get, removing it would be as simple as

sudo apt-get remove nginx

//Instead, you can also use

sudo apt-get purge nginx

//First one removes all package files, while the second also removes the configuration files.
//If you intend to use nginx later on with the configuration you did, use remove. Else, I would suggest using purge.

//After removing nginx, you can restart apache to make sure it is listening to port 80.

sudo apache2ctl restart

//If you had removed apache before installing nginx, you can re-install it with

sudo apt-get install apache2 
 
 

No comments:

Post a Comment

GitHub repository using Git Bash command

  To add a project to a GitHub repository using Git Bash command line, you can follow these steps: Create a new repository on GitHub by logg...