0

How to uninstall apache2 ?

I needed to install phpmyadmin, but it got errors so i decided to uninstall it and reinstall mysql php and apache.

But I am unable to uninstall apache.

I uninstalled it the following way:


$ whereis apache

$ apache:

$ which apache

$

still I'm getting "Ubuntu Logo Apache2 Ubuntu Default Page" at localhost

abu_bua
  • 11,313

1 Answers1

1

Apache has commands in post-installation to drop a 'default' page into /var/www/html if there's not already content in that directory. Other web servers like NGINX in the repos have a similar configuration step.

If you remove /var/www/html/*.html you should be able to get rid of the 'default' index page. You can alternatively just erase that directory if you wish, but it's your choice which of these you do.

That index page though it was originally Apache installed doesn't mean Apache is still installed - if pidof apache2 doesn't return anything then Apache is not installed and the file is a leftover left in place by the package, and can be safely removed.

Thomas Ward
  • 78,878