Monday, February 7, 2011

Apache gives me 403 Access Forbidden when DocumentRoot points to two different drives

I am getting an 403 access forbidden when attempting to open a page under a vhost where the document root is sitting on a different drive than where apache is sitting. I installed using the apachefriends release. This is my httpd-vhosts.conf file:


NameVirtualHost 127.0.0.1

<VirtualHost 127.0.0.1> ServerName foo.localhost DocumentRoot "C:/xampp/htdocs/foo/public" </VirtualHost>

<VirtualHost 127.0.0.1> ServerName bar.localhost DocumentRoot "F:/bar/public" </VirtualHost>

When opening bar.localhost in my browser, Apache is giving me 403 Access Forbidden. I tried setting lots of different access rights, even full rights to everyone, but nothing I tried helped.

Edit: Thanks! For future reference, add 'Options indexes' within to show directory indexes.

  • Somewhere, you need to tell Apache that people are allowed to see contents of this directory.

    <Directory "F:/bar/public">
        Order Allow,Deny
        Allow from All
        # Any other directory-specific stuff
    </Directory>
    

    More info

    From Splash

0 comments:

Post a Comment