I am trying to access web sites on my Mac using the internal IP and receive the following error - 'Forbidden You don't have permission to access /index.html on this server.' This error was generated using the following URI - http://10.0.1.3/index.html. If I replace the IP with 'localhost' all is good.

The URI http://10.0.1.3/~myusername/ does resolve just fine.

My Mac firewall is disabled. There are no .htaccess files in place and my httpd.conf is pretty straightforward. I have been looking at document root permissions and ownership (apache runs as _www/_www and execute permissions are set on the document root and my index.html file in the root) but still no joy.

Here is /etc/hosts content without comment lines:

127.0.0.1 localhost

255.255.255.255 broadcasthost

::1 localhost

fe80::1%lo0 localhost

link|improve this question
feedback

1 Answer

If you have already checked file permissions then you are probably running into one of these directives:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

That is from the stock OS X Lion httpd.conf. It looks like you'll need to add an allow directive somewhere if you want to hit /index.html. I assume somewhere else in your config is an allow that lets it work if the hostname matches some virtualhost. You'd have to post your config to help debug further.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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