I’ve made one droplet, I’m trying to host a website on the main domain and roundcube (webmail software) on a subdomain (mail.domain.com). The problem is that the subdomain is directed at the same folder as the main domain so making a change to one automatically changes the other.
From what I can tell the main folder is located at: /var/www/html while the mail subdomain is at /var/mail but for some reason the subdomain is not pointing to that folder, its point to the main.
Below I’ve attached a screenshot of my DNS configuration:
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!
DNS only maps a hostname (domain, subdomain, etc.) to an IP address, while the webserver (Apache in this case) decides what files to serve for each hostname.
You need to add a virtualhost for mail.domain.com that points to /var/mail, see How To Set Up Apache Virtual Hosts on Ubuntu 14.04 LTS | DigitalOcean.
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.