0

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 ?

  • Try clearing temporary data like cache, cookie or try in incognito/private browsing – Kulfy Sep 30 '18 at 21:42
  • Find out which process is serving port 80: sudo lsof -i tcp:80, and kill it. – waltinator Sep 30 '18 at 23:29
  • Can you share the command you used to remove Apache? It's possible it wasn't removed correctly. – thomasrutter Sep 30 '18 at 23:59
  • @waltinator: this doesn't show any process running, but browser still serves local apache page, after restarting the browser. – Rahul Oct 1 '18 at 0:11
  • 2
    Possible duplicate of Permanently removing apache2 – muru Oct 1 '18 at 1:36
1

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'

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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