Page 1 of 1

Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

PostPosted: 24. June 2014 19:43
by wemersonrv
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>

Re: Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

PostPosted: 24. June 2014 19:46
by Altrea
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)

Re: Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

PostPosted: 24. June 2014 19:52
by wemersonrv
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.

Re: Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

PostPosted: 24. June 2014 20:04
by Altrea
Read the first part of my answer, the solution is near...

Re: Xampp 1.8.3.4 / Windows 7 - VirtualHost 403 Error

PostPosted: 24. June 2014 20:09
by wemersonrv
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