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?
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.
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.
I had the same problem. To my wonder clearing history and cookies of the browser worked.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With