virtual hosts / documentRoot problem

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

virtual hosts / documentRoot problem

Postby tmk » 23. February 2007 03:40

I have a problem with virtual hosts configuration on XAMPP/Windows XP

i want to set up a virtual host called "test"
i red a lot of tutorials etc, but 1 thing isn't working.
i get the host when i type "http://test/" in browser, but it redirects me to DocumentRoot of localhost server.

my vhost.conf (except of commented lines):

NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot "C:/Program Files/xampp/htdocs/test"
ServerName test

httpd.conf - no changes.

i've edited the host file in system32 and such.

i also tried to set another VH for localhost, but it didnt change anything.

please help me because i have no more ideas...

ps. runnin newest version of xampp, downloaded today.
Posts: 2
Joined: 23. February 2007 03:33

Postby Wiedmann » 23. February 2007 03:58

but it redirects me to DocumentRoot of localhost server.

What did you mean with this?
AF Moderator
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby tmk » 23. February 2007 04:03

i meant that using http://test/ = http://localhost/
but no bother.
as u r a moderator, u can erase this topic.
i just handled this problem (it was my mistake)
thanks anyway, for reply in the middle of the night (:
Posts: 2
Joined: 23. February 2007 03:33

Postby juno_939 » 09. April 2007 11:34

Please can you put here your solution because there are 2 users of xampp for linux that have the same problem and we can't solve it.

Excuse me for my bad english.
Posts: 2
Joined: 26. March 2007 10:19

Postby the_ripper » 14. April 2007 01:55

why you not try make an alias in httpd.conf...
you just need to type this script :

Alias /u're alias "D:/test"(this is directory u want to put ur files)
<Directory "D:/test">
AllowOverride None
Options None
Order allow,deny
Allow from all
Posts: 4
Joined: 05. February 2007 12:43

Postby april » 14. April 2007 19:57

I've just cracked this problem for myself and I bet you're doing the same thing I was. I'm using a base path:


This is what I have for my httpd-vhosts.conf file now:

NameVirtualHost *:80

## This part is essential for telling Apache that the folder "web" contains
## all of the virtual hosts on my computer. Otherwise your first site will
## become localhost, which you don't want. If you aren't using
##<Directory> it isn't an issue.
<Directory C:\web>
Order Deny,Allow
Allow from all

##each subsequent site is set up as the example below.

<VirtualHost *:80>
DocumentRoot C:\web\\htdocs
<Directory C:\web\\htdocs>
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Order allow,deny
Allow from All
Posts: 24
Joined: 09. January 2007 19:06

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 41 guests