Question

Server refusing to connect - Apache2 after a WP successfully installed droplet and DNS correctly set

After installing a WP droplet server is refusing connection (ERR_CONNECTION_REFUSED) despite DNS is pointing in the right direction. Pinged both IP and domain and it looks good. If I access the web page via ip address the default DigitalOcean page for setting up the WP again is displayed. Ubuntu, Apache, wp sh from DigitalOcean.


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.

Bobby Iliev
Site Moderator
Site Moderator badge
February 27, 2025

Hi there,

Does this also happen for both the domain and the IP address? If it’s only the domain, it could be a DNS issue. If it’s both, it’s likely an Apache or WordPress configuration issue.

Make sure Apache is running:

sudo systemctl status apache2

If it’s inactive, start it with:

sudo systemctl restart apache2

Also check your Virtual Host configuration:

sudo apachectl -S

Lastly, check Apache logs for errors:

sudo journalctl -xeu apache2

Also, did you use the 1-Click WordPress installation from the Marketplace?

- Bobby

KFSys
Site Moderator
Site Moderator badge
February 28, 2025

Heya,

Are you sure you followed the initial setup to configure your domain? It sounds to me like you might not have your domain added to your Apache configuration.

Also, make sure your domain actually points to that droplet. You can check your DNS here

https://www.digitalocean.com/community/tools/dns

alexdo
Site Moderator
Site Moderator badge
February 28, 2025

Heya,

If Apache is failing to start you can examine the logs to retrieve a more detailed error that can help you to understand what is causing the issue.

If you are troubleshooting a Debian or Ubuntu derived system, examine /var/log/apache2/error.log for errors using a tool like tail or less. For example, to view the last two lines of the error log using tail, run the following command:

sudo tail -n 2 /var/log/apache2/error.log

You can find more information here:

https://www.digitalocean.com/community/tutorials/how-to-troubleshoot-common-apache-errors

Hope that this helps!

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

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.