Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

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

Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

Postby wemersonrv » 24. June 2014 19:43

Hi.

I'm using Xampp 1.8.3-4 on windows 64 bits, installed on D:\xampp folder.

Then i'm try to use VirtualHost, but does not work... When i try to access it, returns a 403 error... How i do to fix it?

The http://localhost is fine... only in the vhost has the problem... and in the D:\xampp\apache\conf\httpd.conf the line that includes the vhost configs is uncommented...
Code: Select all
Include conf/extra/httpd-vhosts.conf


Below, my D:\xampp\apache\conf\extra\httpd-vhosts.conf
Code: Select all
NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin admin@localhost
    DocumentRoot "D:/xampp/htdocs"   
    ServerName localhost
    ServerAlias localhost
    ErrorLog "logs/localhost-error_log.log"
    CustomLog "logs/localhost-access_log.log" common
    <Directory "D:/xampp/htdocs">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>


# laravel4.local
<VirtualHost *:80>
    ServerAdmin admin@localhost
    DocumentRoot "D:/teste"
    ServerName laravel4.local
    ServerAlias laravel4.local
    ErrorLog "logs/laravel4.local-error_log.log"
    CustomLog "logs/laravel4.local-access_log.log" common
    <Directory "D:/teste">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
wemersonrv
 
Posts: 9
Joined: 11. November 2009 12:10

Re: Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

Postby Altrea » 24. June 2014 19:46

Apache 2.4 introduced a new access control
http://httpd.apache.org/docs/current/howto/access.html

And the NameVirtualHost line is obsolet (you should have an entry for this in your error.log)
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

Postby wemersonrv » 24. June 2014 19:52

Altrea wrote:Apache 2.4 introduced a new access control
http://httpd.apache.org/docs/current/howto/access.html

And the NameVirtualHost line is obsolet (you should have an entry for this in your error.log)


Altrea, i'm try with and without NameVirtualHost... with the same result.
wemersonrv
 
Posts: 9
Joined: 11. November 2009 12:10

Re: Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

Postby Altrea » 24. June 2014 20:04

Read the first part of my answer, the solution is near...
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

Postby wemersonrv » 24. June 2014 20:09

Altrea wrote:Read the first part of my answer, the solution is near...


Understand now... just edit my httpd-vhost.conf and add the Require all granted line in my Directory section

Code: Select all
# laravel4.local
<VirtualHost *:80>
    ServerAdmin admin@localhost
    DocumentRoot "D:/Dropbox/Estudos/laravel/laravel4.local/public/"
    ServerName laravel4.local
    ServerAlias laravel4.local
    ErrorLog "logs/laravel4.local-error_log.log"
    CustomLog "logs/laravel4.local-access_log.log" common
    <Directory "D:/Dropbox/Estudos/laravel/laravel4.local/public/">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all   
        Require all granted   # Here
    </Directory>
</VirtualHost>



Thanks
wemersonrv
 
Posts: 9
Joined: 11. November 2009 12:10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 100 guests