I am again getting frustrated by my nginx server. I am trying to install laravel in my /var/www/project folder but when i delete the default HTML dir from /var/www/html it deviates me to the nginx welcome page. phpmyadmin doesn't work either.

How can I get Apache back and also remove nginx permanently?

2 Answers 2


Follow the Step to switch nginx to apache2

sudo apt-get remove nginx
sudo apt-get purge nginx
sudo apt-get remove nginx-common
sudo apt-get purge nginx-common
sudo apt-get remove nginx-full
sudo apt-get purge nginx-full
sudo apt-get autoremove

After removing nginx make sure your nginx remove completely. by running this command.

sudo dpkg -l | grep nginx

If you get any pacakges related with nginx, remove them.

Now Install apache2 on your Ubuntu and all your services related with your projects.

 sudo apt-get install apache2

First autoclean n autoremove unnecessary files sudo apt-get autoclean sudo apt-get autoremove

Re install apache2 and check


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.