Question

Can't access droplet by domain, only by IP

I’ve created a droplet from the Wordpress image and I could access it by IP and by domain. I had to rebuild it, but now I can only access it by IP. When I try to access by domain I got Connection Refused error. Here’s how my DNS is set: http://imgur.com/a/lTWQ5

Show comments

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.

Hello there,

This will usually indicate that the virtual host for the IP address is not configured the same way as the vhost for the domain name.

You can check our article on How To Set Up Apache Virtual Hosts on Ubuntu for additional information:

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-20-04

Looking at the provided log the vhost is configured to have the following document root - /var/www/html/ and this triggers an error that the xmlrpc.php file is not found inside the root directory.

You can adjust the Documentroot to be the same as for the domain name and this should sort the issue for you.

Regards

This comment has been deleted

@gpressutto5

Please post the output of:

tail -20 /var/log/apache2/error.log

We can check the error log to see if there’s any useful errors or warnings being logged that’ll help to identify the issue.