Access forbidden! for virtual host when documentroot is outside of apache default root

11,250

Solution 1

Problem solved with adding

<Directory D:/docs>
  Options Indexes +FollowSymLinks Includes ExecCGI
  AllowOverride All
  Order allow,deny
  Allow from all
</Directory>

Solution 2

403 access forbidden means just that. Check that the apache process has permission to read and traverse the underlying filesystem d:/docs. If it doesn't then make it so.

Share:
11,250
MrKen
Author by

MrKen

Contact me on facebook

Updated on September 18, 2022

Comments

  • MrKen
    MrKen almost 2 years

    I have a virtual host:

    Listen 192.168.0.1:2020
    NameVirtualHost 192.168.0.1:2020
    <VirtualHost 192.168.0.1:2020>
       DocumentRoot "D:/docs"
    </VirtualHost>
    

    no when i try to access virtual host, i get 403 error:

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

    Edit
    Apache is installed in D:/apache
    while virtual host is in D:/docs

  • MrKen
    MrKen about 12 years
    I found the solution
  • MrKen
    MrKen about 12 years
    Not completely solved the problem
  • MightyPork
    MightyPork about 9 years
    this did not work for me
  • MrKen
    MrKen about 9 years
    @MightyPork try set the folder permission chmod 775