Report this

What is the reason for this report?

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

Posted on January 27, 2015

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 (https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts).

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 http://trigger-treat.com 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.



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!

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.

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/infogristle.com/public_html/index.html domain 3 at /var/www/monkeyfactory/public_html/index.html

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

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.