0

I am trying to access web sites on my Mac.

If I use http://10.0.1.3/index.html then I get a web page with the following error on it: Forbidden You don't have permission to access /index.html on this server.

If I replace the IP with 'localhost' all is good.
The URI http://10.0.1.3/~myusername/ also works fine.

My OS 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
1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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