Score:0

Why is apache2 still in my ubuntu after I have deleted?

fk flag

So, I wanted to learn how to use the Nginx web server, and I wanted to try it out in my local machine, but I had apache2 installed in my laptop (ubuntu 20.04 LTS), so I tried to remove it using the following command:

  1. I have stop apache2 from running using: sudo service apache2 stop
  2. Then I removed and cleaned up all the apache2 packages with: sudo apt-get purge apache2 apache2-utils apache2-bin apache2.2-common
  3. Finally, just in case any clean up is needed I ran: sudo apt-get autoremove

But when I go back to my browser (Chrome), and type localhost I get the default homepage for apache2.

DefaultWepPageApache2

How can I remove it completely? I want this because I want to use the Nginx web server. I am learning about web architecture so excuse my question is not well-formatted.

in flag
Chrome will often cache things for a while. Are you certain it's not just the cached version of the page that's being loaded? Also, I do not believe the `/var/www` directory is removed when Apache is taken out so, if you have nginx or another web server installed, that may be serving the page
FedKad avatar
cn flag
Run `sudo ss -ltpn | grep :80` to see the process listening the _http_ port.
Joepie Es avatar
eg flag
Check the settings in Chrome. I think it is set as the first page it opens. And like @matigo wrote it is cached.
Leuel Asfaw avatar
fk flag
@FedKad `users:(("nginx",pid=55760,fd=6),("nginx",pid=55759,fd=6),("nginx",pid=55758,fd=6),("nginx",pid=55757,fd=6),("nginx",pid=55756,fd=6))`, i got this when I ran the command
Leuel Asfaw avatar
fk flag
@matigo I don't know, how can I check that it is a cached version of the page?
Score:1
in flag

Based on your comment to FedKad, your machine is already running Nginx. Both Apache and Nginx use the /var/www/html directory as their default starting point.

When you uninstall Apache, the files contained within that default directory are not deleted as that may delete a bunch of your work. For this reason, the default Apache file, index.html was left intact. When you visit http://localhost in your browser, Nginx is serving the index.html that came with Apache, nothing more.

You can confirm this by checking your Nginx logs located in /var/log/nginx.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.