Custom domain document root isn't working

March 4, 2014 1.4k views
I'm new to digital ocean and new to server management in general, so please forgive me if I've missed something obvious here. I want to be able to host multiple domains on my single VPS, with each domain defaulting to it's document root at /var/www/ So far I have: 1) Followed the getting started guide to create my server, set it up and install LAMP. 2) Accessed the server through FTP client, where I can successfully upload files and view them online. 3) Successfully set up my host name, which is working, as per this guide 4) Completed this guide to set up multiple virtual hosts For a brief moment, visiting my domain successfully showed me the contents of /var/www/ but now it is only showing me the contents of the root at /var/www At a guess, I'm assuming the issue may be because the DNS records for my domain have been configured to link to this droplet as some kind of master domain for the server, rather than as one of many domains being hosted, but I'm not really sure. Another thing to note, shortly before it stopped working I did install VirtualMin - just experimenting to see what it was like - I don't see that it would cause issues but could this have affected things? Is anyone able to point me in the right direction? Thanks very much!
1 Answer
as I understand you have installed Apache for multiple vhosts. ok, possibly your DNS record have some issue, but let me ask you first these questions:

1- Your multiple vhosts are based on domains, right? That means each vhost has its own domain, correct? if so, then did you configure each domain separately on DNS panel on DO?

2- Did you create a root path for each of your vhost?

I guess if you answered these questions you might know what went wrong.

Have another answer? Share your knowledge.