vhosts not working properly in Win 7 64b & 1.7.7

Problems with the Windows version of XAMPP, questions, comments, and anything related.

vhosts not working properly in Win 7 64b & 1.7.7

Postby big0mik » 28. February 2012 06:12

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
big0mik
 
Posts: 1
Joined: 28. February 2012 05:53
Operating System: Windows 7 64-bit

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

Postby Sharley » 01. March 2012 02:33

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>
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 43 guests