Custom domain document root isn't working

  • Posted March 4, 2014

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!


Submit an 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.

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: <br> <br>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? <br> <br>2- Did you create a root path for each of your vhost? <br> <br>I guess if you answered these questions you might know what went wrong. <br> <br>