Report this

What is the reason for this report?

Can't access droplet by domain, only by IP

Posted on June 8, 2017

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



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.

@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.

This comment has been deleted

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

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.