Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


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!


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!


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
share|improve this question

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.

share|improve this answer
up vote 1 down vote accepted

It was definitely a permissions problem.

Solved by adding:

<Directory />
    Options +FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

to /private/etc/apache2/extra/httpd-vhosts.conf.

I also needed to edit the hosts file on the guest OSs (Windows XP and 7) like so: somevhost

Where the IP address stated is that of the host OS and somevhost… is the name of the virtual host on the host OS.

I needed to set the host OS to use a static IP, as if it were assigned by DHCP, you'd have to edit the host file on the guest OS each time your host OS's IP changed.

These Web sites really helped:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.