vhosts in different directory access forbiden 403 problem

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

vhosts in different directory access forbiden 403 problem

Postby coffeecup » 18. August 2014 08:47

I've just installed 'xampp-win32-1.8.3-4-VC11-installer.exe' on a 64bit windows 7, and configured 2 groups of namebased virtualhosts, group 1 is under 'C:\etc\xampp\htdocs\', group 2 is under 'C:\etc\www\vhosts\'I can freely access virtualhosts inside the xampp default htdocs directory. But virtualhosts in different directory can't be accessed, please see the browser message below:
Code: Select all
Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.
Error 403
pdground.net
Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11


my httpd-vhosts.conf
Code: Select all
NameVirtualHost *:80
<VirtualHost *>
   DocumentRoot "C:/etc/xampp/htdocs"
   ServerName localhost
</VirtualHost>

# vhosts in group 1
<VirtualHost *>
    ServerAdmin webmaster@autumn.dev
    DocumentRoot "C:/etc/xampp/htdocs/autumn"
    ServerName autumn.dev
    ServerAlias http://www.autumn.dev
    ErrorLog "logs/autumn.dev-error.log"
    CustomLog "logs/autumn.dev-access.log" common
   <Directory "C:/etc/xampp/htdocs/autumn">
      Require all granted
   </Directory>
</VirtualHost>

# vhosts in group 2
<VirtualHost *>
    ServerAdmin webmaster@pdground.net
    DocumentRoot "C:/etc/www/vhosts/pdground"
    ServerName pdground.net
   ServerAlias www.pdground.net
    ErrorLog "C:/etc/www/logs/pdground.net-error.log"
    CustomLog "C:/etc/www/logs/pdground.net-access.log" common
   <Directory "C:/etc/www/vhosts/pdground">
      #AllowOverride All
      #Order allow,deny
      #Allow from all
      Require all granted
   </Directory>
</VirtualHost>


I've search and read some relating posts that discussed on this, but I still can't fix my problem.
Hope can get any help!
Thanks.
coffeecup
 
Posts: 5
Joined: 18. August 2014 07:48
XAMPP Version: 5.5.19
Operating System: wndows 7

Re: vhosts in different directory access forbiden 403 proble

Postby Altrea » 18. August 2014 09:59

There is either no index document or the directory is read-protected

Is there a index.php file inside that vhosts?
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: 6758
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: vhosts in different directory access forbiden 403 proble

Postby coffeecup » 18. August 2014 12:18

Oooops, my stupid !!
I'd put a hello.php in it, but not the index.php! Now site appeared when changed it's name to index.php. :oops:

Well, add an option
Code: Select all
Options Indexes FollowSymLinks


Now can display the site contents.
coffeecup
 
Posts: 5
Joined: 18. August 2014 07:48
XAMPP Version: 5.5.19
Operating System: wndows 7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 34 guests