Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After stopping Apache service, why can I still get Apache default page on my IP address?

Tags:

I want to install Nginx, but the port 80 has been taken up by Apache2. I stop it by:

$ sudo kill -9 my-apache-pid

$ sudo service apache2 stop

$ sudo /etc/init.d/apache2 stop
[ ok ] Stopping apache2 (via systemctl): apache2.service.

and I can install Nginx. I usesudo systemctl status nginx. It shows working well and Apache2 seems inactive. But when I enter my IP address in the browser, it still shows Apache2 hello-page. Why?

like image 667
Lainly Avatar asked Mar 16 '18 09:03

Lainly


People also ask

What is the Apache default page?

1 Answer. Apache2 from the Ubuntu repository gets it's default location from /etc/apache2/sites-available . The default page configuration is the 000-default.

How do I know if Apache is running?

Hence, to check if Apache is running on Ubuntu, macOS, Windows, follow these steps: In most cases, when you type http://server-ip:80 on any of the browsers you use, it would show whether Apache is running. However, you can search further by putting the command of “service apache2 status” to be sure.


2 Answers

I had the same problem. To my wonder clearing history and cookies of the browser worked.

like image 93
Aditya Avatar answered Oct 11 '22 16:10

Aditya


Apache and Nginx home pages located in this directory:

/var/www/html

But there is a small point, and that is that each of these two apps that were installed earlier takes up the index.html file, and when you enter the address of localhost in the browser, that file actually opens.

As a result, all you have to do is go into this directory and see what the name of Nginx home file.you must do this in your terminal:

ls -l /var/www/html

that show index.nginx-debian.html name for Nginx html file, So if you search for this address in your browser:

localhost/index.nginx-debian.html

you can see the home page of Nginx.

all you need for show Nginx home page when search localhost is change then name of those two files.

like image 36
Whale 52Hz Avatar answered Oct 11 '22 18:10

Whale 52Hz