Apache Error 403 after configuring virtual hosts

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

Apache Error 403 after configuring virtual hosts

Postby johnwarde » 22. January 2006 21:03

Hi,

I have installed XAMPP 1.5.1 on my Windows XP machine and I am having trouble setting up virtual hosts.

The following entries are in my HOSTS file:

-------------------------------------------------------
127.0.0.1 localhost
127.0.0.1 local.test.com
-------------------------------------------------------

I have added the following to the end of my httpd.conf:

--------------------------------------------------------
NameVirtualHost *:80

<VirtualHost *:80>
ServerName localhost
DocumentRoot "C:/DevApps/xampp/htdocs"
</VirtualHost>

<VirtualHost *:80>
ServerName local.test.com
DocumentRoot "C:/Dev/Web/www"
</VirtualHost>
--------------------------------------------------------

Restarted Apache. The first virtual host re-enables the XAMPP website and works however the second virtual host does not work and Apache reports

-------------------------------------------------------
Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster.
Error 403
-------------------------------------------------------

when I browse to local.test.com or http://local.test.com/index.htm

In the error.log file :
-------------------------------------------------------
Sun Jan 22 19:40:01 2006] [error] [client 127.0.0.1] client denied by server configuration: C:/Dev/Web/www/index.htm
-------------------------------------------------------

How do I get my "local.test.com" virtual host to work?

Thanks for your help,

John
User avatar
johnwarde
 
Posts: 2
Joined: 22. January 2006 20:34

Postby Wiedmann » 22. January 2006 21:25

Read the Apache manual about directory-blocks and the "allow" directive.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby johnwarde » 23. January 2006 10:43

Hi,

I added the following to my httpd.conf:

<Directory />
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

I thought I had tried this already but it work now. I knows its undesireable from a security point of view to have this set-up but the websites are internal only, but I can work from this point to make more secure.

John
User avatar
johnwarde
 
Posts: 2
Joined: 22. January 2006 20:34

403 forbidden error

Postby nick.kirby » 23. January 2006 20:27

Hello there, I am having the same problem.

I have XAMPP Apache configured inside of a virtual machine on 192.168.1.30.

I have used the extra/httpd-vhosts.conf to configure virtual hosts which I intend eventually to be internet facing.

I am using an XP machine to connect to the virtual machine, and it's host file is edited to show that www.test.com is on 192.168.1.30.

Basically, as far as I can see, there are no config errors. Apache starts without issue, the vhosts are correctly configured, but I still get this error.

What have i missed?
nick.kirby
 
Posts: 12
Joined: 23. January 2006 20:13

Postby WorldDrknss » 24. January 2006 06:35

www.worlddrknss.blogdns.org <-- XAMPP Tutorials
User avatar
WorldDrknss
 
Posts: 292
Joined: 17. September 2005 13:40

Postby nick.kirby » 24. January 2006 11:04

Hello, many thanks for advice! I changed the Deny All to Allow all. Works perfectly.

thank you!
nick.kirby
 
Posts: 12
Joined: 23. January 2006 20:13


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 120 guests