Simple apache question (I think)

georgecrawford

Registered
Hi.

Can someone please explain this.

When I browse to http://127.0.0.1 I get the contents of my Library/Webserver/Documents directory.

Fine.

When I go to http://127.0.0.1/~myusername I get this error:

You don't have permission to access /~myusername/ on this server.

... instead of seeing the contents of my Users/myusername/Sites directory.

Why is this? I'm fairly new to apache and webserving on OS X so I expect there is a simple solution I'm overlooking.

Thanks
 
do a get info on your sites directory and make sure is is readable by everyone (in permissions). The webserver must be able to read the contents of the folder to be able to serve it. You will probably want to hit the apply to enclosed items button as well
 
Make sure you have an "index.html" (all lower cAsE) file there.

If you don't have directory listings enabled and the default file does not exist, that's what you will see...
 
Back
Top