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 ?
- 36,068
- 10
- 86
- 105
- 151
- 1
- 2
- 8
-
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 01 '18 at 00:11
-
@thomasrutter: apt purge apache2 – Rahul Oct 01 '18 at 00:12
-
@Kulfy: yes, in incognito, its not directing to default apahce page – Rahul Oct 01 '18 at 00:13
-
2Possible duplicate of [Permanently removing apache2](https://askubuntu.com/questions/176964/permanently-removing-apache2) – muru Oct 01 '18 at 01:36
-
@Rahul in that case it is due to temporary data like cookies and cache. Go to browser settings and clear them and then try again – Kulfy Oct 01 '18 at 03:41
2 Answers
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'
- 5,419
- 2
- 27
- 36
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.
- 105,631
- 46
- 284
- 425
- 131
- 2