Home › Forums › Other › Apache VirtualHost › Re: Apache VirtualHost
I’m not sure if it makes a difference, or if we have different versions of Apache, but I don’t use a httpd-vhosts.conf file at all, and have my virtual hosts all in the httpd.conf file:
Include “c:/WAMP/alias/*”
NameVirtualHost *:80
DocumentRoot “c:/Projects”
ServerName localhost
DocumentRoot “c:/Projects/Testsite”
ServerName testsite
A few things you might want to check:
1) the Include "c:/WAMP/alias/*"
line, not sure if this required or not
2) in my case, the other sites have to be in a subfolder of the “main” site, in my case C:/Projects. The main site is what has been set as the “document root”, a little higher in the httpd.conf. I’m sure this should not be a requirement, but I can’t get it to work when a site is outside of that location, so maybe may be for you too.
Who knows this helps.