By davidgoate
Is there anything you need to do in particular to allow a DigitalOcean droplet to serve content for domains that with DNS configuration managed outside of DigitalOcean?
I have hit an issue with my setup. I have a domain registered with Fasthosts (let’s say x.com) and I don’t want to migrate all of my DNS records, so instead I just created a subdomain A record in the DNS management tools of Fasthosts (let’s say foo.x.com) and pointed it directly at my droplet IP address.
When I use tools like "ping foo.x.com" or “dig @8.8.8.8 foo.x.com A” I get the correct droplet IP address returned. So far, so good…
When I try to reach foo.x.com in my browser I get a HTTP 403 Forbidden message coming from nginx/1.4.6 (Ubuntu).
I have NGINX configured and running on my droplet, and I know that this is working because I have other domains running successfully in NGINX on the same droplet (but these domains are using DigitalOceans NS servers).
First of all I thought it was a permissions issue for the static files, but I verified the owner and group settings as well as the file permissions via the normal chown and chmod commands.
My next step was to try a curl locally on the droplet using a Host header for foo.x.com and in this case I get a HTTP 200. So it seems to be ok when access on localhost. Next I tried stopping NGINX and to my surprise I still get the same HTTP 403, whereas - as you’d expect - my other domains are not reachable. So now I’m beginning to think that this is down to the way my DNS is configured.
Since all of my DNS was being handled in the Fasthost configuration I didn’t see why I’d need to configure anything on the DigitalOcean side, but now I’ve tried setting up a A record and CNAME for x.com and foo.x.com with no NS records, I’m waiting for this to propagate, so I don’t know if this solution will work yet…
Can anyone tell me if there is something I’ve missed or should setup for this to work. Thanks in advance.
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!
If you are happy using the DNS management tools provided by your registrar, you don’t need to use DigitalOcean’s at all. We simply provide the tools to configure DNS records from our control panel for the convenience of our users who would rather manage both their servers and and their DNS records in the same place.
A 403 Forbidden error is most likely going to lay in your server configuration rather than your DNS settings. A common cause is a problem with the file permissions in the folder you are trying to serve. If you could give us more more details about that part of the equation, we can probably be of help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.