Virtual and 'non-virtual' hosts on the same droplet?

January 27, 2015 756 views

I've read through the directions on setting up virtual hosts on a Ubuntu-provisioned droplet a couple times, and then worked through them step by step a couple times (

What I'm trying to set up is a "non-virtual" host at /var/www, with two virtual hosts inside at /var/www/infogristle/publichtml and /var/www/monkeyfactory/publichtml. The non-virtual host at works fine. Attempting to reach the virtual hosts results in the page for the non-virtual host to appear instead.

Do I need to convert my non-virtual host into a virtual host for this to work, or can you mix and match?

Thanks in advance.

1 comment
  • Can you clarify what you mean by a "non-virtual host"? Since your droplet only has a single IP address the only way to host more than one site is via domain based virtual hosts.

3 Answers

When you first do your install, there is an Apache2 info page at /var/www/index.html. I was referring to this as the "non-virtual" host. Maybe I should have said the default host. Sorry. I'm trying to have:

domain 1 at /var/www/index.html
domain 2 at /var/www/
domain 3 at /var/www/monkeyfactory/public

However, only the page at /var/www/index.html is appearing.

  • Apparently, underscores turn italics on and off, huh? Well, there are supposed to be underscores between "public" and "html," just in case this is confusing.

Nevermind. I've given up on this droplet, and created a new one that uses Server Pilot. Worked on the first try.

Have another answer? Share your knowledge.