Page 1 of 1

vhosts not working properly in Win 7 64b & 1.7.7

PostPosted: 28. February 2012 06:12
by big0mik
My first issue is that no matter what local site I'm trying to view I get the first vhost in that file. I can browse the site I want but the data that comes up is from the first site. My vhosts file and hosts file have been properly edited.

hosts:
127.0.0.1 local.bmg.com
127.0.0.1 local.wop.com
127.0.0.1 local.udc.com
127.0.0.1 local.madcornhole.com
127.0.0.1 local.centrestage.com
127.0.0.1 local.jbhf.com
127.0.0.1 local.regency.com
127.0.0.1 local.signproducers.com
127.0.0.1 local.stewards.com

vhosts:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName local.bmg.com
DocumentRoot "d:/bmg/web/"
<Directory />
Options FollowSymLinks
AllowOverride None
Options None
Order allow,deny
Allow from all
Satisfy all
</Directory>
</VirtualHost>
+ several more just like this.

The second issue that may be responsible for the first is that I can not stop services from the XAMPP control panel. I get
Busy...
Error: -1

That leads me to believe something didn't get configured correctly during install somehow (I used the installer into c:/xampp/). My first install a few years ago was so simple I find it hard to believe I screwed something up this time.

What else can I tell you or what can you tell me?

Thanks,

Mike

Re: vhosts not working properly in Win 7 64b & 1.7.7

PostPosted: 01. March 2012 02:33
by Sharley
If your vhost code is wrong then you will always be served the first entry in the file.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName local.bmg.com
DocumentRoot "d:/bmg/web/"
<Directory />
Options FollowSymLinks
AllowOverride None
Options None
Order allow,deny
Allow from all
Satisfy all
</Directory>
</VirtualHost>
Your Directory directive must be the same as your DocumentRoot directive and no backslash at the end of the path, for example.
Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
ServerName local.bmg.com
DocumentRoot "D:/bmg/web"
<Directory "D:/bmg/web">
Options FollowSymLinks
AllowOverride None
Options None
Order allow,deny
Allow from all
Satisfy all
</Directory>
</VirtualHost>