Domain Configuration

Posted May 25, 2014 2.7k views
Hi, I have a droplet in DigitalOcean and am having issues to configure a domain a bought on it. So, I have a LAMP on Ubuntu 12.04 installed on my droplet and have a couple of folders in there with a couple of different websites. I also bought a domain through (a brasilian domain name provider) and Im going to buy another domain on goDaddy. I would like to point each of these domain to a subfolder in my droplet, for example: -> myIPonDO/subfolder1 -> myIPonDO/subfolder2 Ive tried a couple of things but had no success, not even to point my domain directly to my IP. :( Any idead of how to do it? Thanks a lot. Diego Dacal.

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.

Submit an Answer
1 answer
First, you need to update your DNS records to point the domain to your droplet:

Then, you need to add a virtualhost so Apache knows what directory to serve each domain from:
by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache.