virtual host not work

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

virtual host not work

Postby elallaix » 24. May 2008 16:08

I have set in httpd_vhost.conf

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "Q:\xampp\htdocs"
ServerName localhost
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "Q:\xampp\htdocs\test"
ServerName local.test
<Directory "Q:\xampp\htdocs\test">
Options Indexes FollowSymLinks ExecCGI
AllowOverride FileInfo
</Directory>
</VirtualHost>


in the host file of windows I have insert

127.0.0.1 local.test


Localhost functions but local.test does'nt work
I can't understand why
can you help me?
elallaix
 
Posts: 1
Joined: 24. May 2008 16:02

Postby LooseCannon » 28. May 2008 10:06

Hello and welcome elallaix.

What do you mean by "doesn't work"? How are you accessing the site, ie browser address? What actually happens?

Surely localhost is trully 127.0.0.1? I believe that it's not changed in order to make virtual hosts function. I think one doesn't even need to refer to the default localhost, ie xampp control panel, in the httpd-vhosts.conf file because it's in the main conf file. I don't know and haven't got the time to check at the moment, sorry.

What's the default homepage for the local.test site? You haven't got a DirectoryIndex parameter set. Eg:
Code: Select all
<VirtualHost *:80>
ServerName local.test
DocumentRoot "Q:\xampp\htdocs\test"
DirectoryIndex default.php
<Directory "Q:\xampp\htdocs\test">
Options Indexes FollowSymLinks ExecCGI
AllowOverride All
</Directory>
</VirtualHost>


I've also swapped the sequence of ServerName and Document Root, for my personal, easy-reading preference. Also the AllowOverride is set to All, because I'm don't know of the FileInfo setting and again, haven't got time to look at it atm.

Good luck. Please let us know how you get on.
User avatar
LooseCannon
 
Posts: 162
Joined: 18. September 2007 12:07
Location: Hampshire, UK


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 161 guests