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

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/public_html and /var/www/monkeyfactory/public_html. 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.

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

This comment has been deleted

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_html/index.html

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