Apache; connection refused

Hello, i am using apache to create a small webserver. Today i tried to add a domain to my droplet. Sadly this dosent work because every time i try to acces the domain, i get the Error: “Err_Conection_Refused”. I already set up the Namespaces. With my domain profider. Here is my config file:

<VirtualHost *:80>

    ServerAdmin admin@example.local

    DocumentRoot /var/www/
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined


How you can see I also listen on port 80.

I hope you can help me.

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Site Moderator
Site Moderator badge
December 30, 2022

Hi @dennismorel,

I know it’s an older topic but I just wanted to provide some useful information in case, someone find this topic.

In such situations, the error is not related to anything on your Droplet as long as your Apache is listening to the correct ports. You can check that with:

  1. nestat -tulpen | grep 80

It’s usually, a DNS issue which means that your Domain is not pointing to the correct Droplet/Server.

Bobby Iliev
Site Moderator
Site Moderator badge
August 7, 2022


Once you’ve changed your name servers, you would also need to add an A record for your domain name to point to the Droplet’s IP address.

Also, after the DNS change it could take up to 24 hours for the DNS cache to clear over the Globe before you could see the new changes.

Let me know how it goes after that!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up