3

I have removed apache from my ubuntu 18.04 including all its config files using apt purge apache2. Browser still show default page on doing localhost:80. Please explain ?

thomasrutter
  • 36,068
  • 10
  • 86
  • 105
Rahul
  • 151
  • 1
  • 2
  • 8

2 Answers2

4

If you run this command and it shows a running Apache2 server, you still have a web server installed:

sudo service apache2 status

It's also possible you have a different web server installed and running, such as lighttpd or nginx. Likewise you can check if they are running:

sudo service lighttpd status
sudo service nginx status

You can also try removing all of the packages associated with them this way:

sudo service apache2 stop
sudo service lighttpd stop
sudo service nginx stop
sudo apt remove apache2 apache2-bin
sudo apt remove lighttpd
sudo apt remove nginx

If for some reason you still have a HTTP server running consider looking at:

which apache2
which lighttpd
which nginx

To see if any files are located in /usr/local or /opt - in which case you have to delete them manually.

You can also find which command specifically is using port 80 using this:

sudo netstat -plnt | grep ':80'
Kristopher Ives
  • 5,419
  • 2
  • 27
  • 36
3

Even after uninstalling apache2 it kept showing the default page. I tried rebooting, but nothing worked, until I cleared the cache and cookies of the Browser

So, try and clear your browser's cache & cookies.

Byte Commander
  • 105,631
  • 46
  • 284
  • 425
Crazzi_Boii
  • 131
  • 2