Virtual hosts?

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

Virtual hosts?

Postby frankie2000 » 28. November 2006 15:22

Hi!

I need to run my webappz in virtual hosts...so i added the following lines in the httpd.conf file:
<VirtualHost *:80>
DocumentRoot C:\dev
ServerName phptest
DirectoryIndex indexa.php
<Directory "C:\dev">
options Indexes FollowSymLinks
</Directory>
</VirtualHost>

I was hoping to see the directory list up all files and dirs but i got a 403 error. Why?

How can i fix it?
frankie2000
 
Posts: 7
Joined: 28. November 2006 15:14

Postby Izzy » 28. November 2006 21:59

Change this part and it may rid you of the 403 error because the defaults in the httpd.conf are restricting directory access and you have to change that behaviour in every Directory directive:
<Directory "C:\dev">
options Indexes FollowSymLinks
</Directory>


to this:
<Directory "C:\dev">
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>


Also add quotes to this because Apache likes the slash going the other way (/):
DocumentRoot C:\dev

to this:
DocumentRoot "C:\dev"

Also when ever you get a server error check the server logs xampp\apache\logs\error.log as they may give you a better clue.
Note the date and time the error appeared and look for the corresponding date and time in the error log.

Just to add if you get errors with the xampp\apache\conf\extra\httpd-vhosts.conf file then issue this command at a prompt in a command console in xampp\apache\bin
apache -S

Issue this command in the same way if you suspect that the xampp\apache\conf\httpd.conf file may have a syntax error preventing Apache from starting:
apache -t
Both of these commands may give you some clues to work with.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby frankie2000 » 29. November 2006 16:38

Woaw...excellent support. It worked like a charm.

Thanx a bunch!
frankie2000
 
Posts: 7
Joined: 28. November 2006 15:14


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 60 guests