XAMPP 1.7.7 virtual host 403 error [Solved]

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

XAMPP 1.7.7 virtual host 403 error [Solved]

Postby MonReveur » 22. September 2012 03:09

I need to be able to access multiple local sites for development. My hosting provider is using Linux but my local laptop is running Windows 7 for development. Here is what I have in httpd-vhosts.conf:

Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin postmaster@localhost
    DocumentRoot "C:/xampp/htdocs"
    ServerName localhost
    ServerAlias www.localhost
    ErrorLog "logs/localhost-error.log"
    CustomLog "logs/localhost-access.log" combined
    <Directory "C:/xampp/htdocs">
        AllowOverride All
    </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin postmaster@carrierscompete
    DocumentRoot "C:/home/carriers/www"
    ServerName carrierscompete
    ServerAlias www.carrierscompete
    ErrorLog "logs/carrierscompete-error.log"
    CustomLog "logs/carrierscompete-access.log" combined
    <Directory "C:/home/carriers/www">
        AllowOverride All
    </Directory>
</VirtualHost>


Here are some of the settings in httpd.conf:

Code: Select all
ServerRoot "C:/xampp/apache"
Listen 80
ServerAdmin postmaster@localhost
ServerName localhost:80
DocumentRoot "C:/xampp/htdocs"


I think I really didn't change much, if anything, in httpd.conf.

However, whenever I put http://carrierscompete in the address bar of any browser, I get the 403 Access forbidden page.
MonReveur
 
Posts: 4
Joined: 21. September 2012 02:26
XAMPP Version: 1.8.0
Operating System: Windows 7

Re: XAMPP 1.7.7 virtual host 403 error

Postby Altrea » 22. September 2012 17:08

Hi MonReveur,

Have you defined a <Directory> Block for your Path C:/home/carriers/www (like the one for C:/xampp/htdocs you can find in your httpd.conf)?
You need to define permissions for requests, otherwise the default rule will deny all requests.

best wishes,
Altrea
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
free software according to purpose of usage
XAMPP 1.8 for local development/testing only
Zend Server 6 (free) for production environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 4516
Joined: 17. August 2009 13:05
XAMPP Version: 1.8.0
Operating System: W7Ux64

Re: XAMPP 1.7.7 virtual host 403 error

Postby MonReveur » 22. September 2012 19:37

Altrea wrote:Have you defined a <Directory> Block for your Path C:/home/carriers/www (like the one for C:/xampp/htdocs you can find in your httpd.conf)?
You need to define permissions for requests, otherwise the default rule will deny all requests.


Yes. That's what's so frustrating. I had even tried changing the C:/xampp/htdocs to C:/home/localhost/www and got the same 403 error for localhost. I don't understand. It's getting the 403 error twice. Once on the directory and once on the favicon.
MonReveur
 
Posts: 4
Joined: 21. September 2012 02:26
XAMPP Version: 1.8.0
Operating System: Windows 7

Re: XAMPP 1.7.7 virtual host 403 error

Postby Altrea » 22. September 2012 20:50

Well, show us your <Directory> Block for that Path. We can't say anything about it without seeing it.
Have you restarted your Apache? Otherwise the configuration changes will not take effect.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
free software according to purpose of usage
XAMPP 1.8 for local development/testing only
Zend Server 6 (free) for production environments
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 4516
Joined: 17. August 2009 13:05
XAMPP Version: 1.8.0
Operating System: W7Ux64

Re: XAMPP 1.7.7 virtual host 403 error

Postby MonReveur » 22. September 2012 21:34

Altrea wrote:Well, show us your <Directory> Block for that Path. We can't say anything about it without seeing it.
Have you restarted your Apache? Otherwise the configuration changes will not take effect.


It's in the httpd-vhosts.conf file listed above... but the directory block there didn't specifically have "order allow,deny" and "allow from all". Fixed that and now it works. I even went chasing after why Windows had the folder marked "Read Only".
MonReveur
 
Posts: 4
Joined: 21. September 2012 02:26
XAMPP Version: 1.8.0
Operating System: Windows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: terrys and 10 guests