Through VirtualBox, I need to access the host's (Mac OS X 10.6) virtual hosts through guest OSs (Windows XP and 7).
I am able to access the localhost
URL and can see the directory structure of the ~/Username/Sites
folder from the guest OSs via the local URL of the host, my Mac, in the guest's browser but get a 403 error when I try to go deeper into the file structure, for example, mymacsname.lcoal/~Username/Sites
is accessible, but I get a 403
when I browse to ymacsname.lcoal/~Username/Sites/somewebsite/
.
NB: I also get the 403
when I try to access ymacsname.lcoal/~Username/Sites/somewebsite/
from my Mac's (host's) browser.
Edit:
I've checked the access logs on the host OS (the Mac) and strangely, if I browse to a directory without a .htaccess
file I receive a "HTTP/1.1" 200 1935
response and am able to either browser that directory's index or am served it's default Web page. If there is a .htaccess
file in the directory I receive a "HTTP/1.1 403 247"
response!
This narrows a lot of the problem down to the .htaccess
file, so I'll continue to research on this, I'm really grateful for your help!
Re-Edit
Going further, it would seem to be an issue with my .htaccess
's mod_rewrite
rules. I've included my .htaccess
code below, it would seem, like it should, that it's redirecting the browser to /Users/Jay/Sites/chassis/library/bootstrap.php
but it would seem I don't have privileges to access that file (bootstrap.php
).
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/public/index.html !-f
RewriteRule ^$ library/bootstrap.php [L]
RewriteRule ^$ public/index.html [L]
RewriteRule ^([a-z0-9/-]+)$ library/bootstrap.php?url=$1 [L,QSA]
Getting so close! Please help me solve this!
Re-Re-Edit
In case this helps, here is a clip from my main Apache configuration file (/private/etc/apache2/httpd.conf
):
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
Best Answer
You might want to start by checking the access logs of the web server to see what is actually being passed onto it - both successes vs. failures.