Report this

What is the reason for this report?

I have Apache2 actively running, apache2.service is enabled, curl -4 icanhazip.com returns IP doesn't show apache2 default page, why?

Posted on May 10, 2023

Apache2 is successfully installed with the following:

 apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor >    
      Active: active (running) since Tue 2023-05-09 17:11:23 UTC; 7h ago

firewall all set properly

sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
22/tcp                     ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
443                        ALLOW       Anywhere
443/tcp                    ALLOW       Anywhere
22/tcp (v6)                ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
443 (v6)                   ALLOW       Anywhere (v6)
443/tcp (v6)               ALLOW       Anywhere (v6)

However when I type http://(IP address) just don’t display the default Apache2 landing page, instead it shows Nothing here yet :/ [Read Docs]



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

In order for your domain name to point to your Droplet and load the content from there, you have to configure your A record in your DNS zone to point to the Droplet’s IP address.

As far as I can see at the moment, your DNS zone is managed via Cloudflare, so you need to log in to your Cloudflare account and update the A record for your domain name to point to the Droplet’s IP address.

Note that it might take up to 24 hours for the DNS cache to clear over the Globe before you can see the new records.

Let me know how it goes!

Best,

Bobby

Hey @8374a2e23a1b41f68cd667622f7d59,

Do you have a default configuration file created or another websirvice configured?

Check if another web server or application is running:

It’s possible that another web server like Nginx or a different application is running on port 80. To check the processes listening on port 80, run:

  1. sudo netstat -tuln | grep :80

If you see another process listening on port 80, stop that process and try accessing your Apache server again.

Check your Apache configuration:

Make sure your Apache configuration is set up to serve the default landing page. The configuration file for the default site should be located at /etc/apache2/sites-available/000-default.conf. Check the content of this file:

  1. cat /etc/apache2/sites-available/000-default.conf

Make sure the DocumentRoot directive is pointing to the correct directory containing the default Apache2 landing page. Typically, this should be /var/www/html:

  1. DocumentRoot /var/www/html

I have checked sudo netstat -tuln | grep :80 no other process is using port 80

have tried restart apache2 sudo systemctl restart apache2 however, it is still not displaying the default Apache home page.

Then I gave a try to uninstall complete removal of apache2 and reinstall it as fresh.

Surprisingly, it works this time, not able to know the cause, though.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.