Page 1 of 1

vhosts in different directory access forbiden 403 problem

PostPosted: 18. August 2014 08:47
by coffeecup
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.

Re: vhosts in different directory access forbiden 403 proble

PostPosted: 18. August 2014 09:59
by Altrea
There is either no index document or the directory is read-protected

Is there a index.php file inside that vhosts?

Re: vhosts in different directory access forbiden 403 proble

PostPosted: 18. August 2014 12:18
by coffeecup
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.