Ask Different is a question and answer site for power users of Apple hardware and software. 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

I'm on my first steps with OS X and I'm trying to setup Apache so I can develop a website. I configured a new alias on /etc/apache2/other with the following content, pointing to my project folder, like this:

Alias /mySite /Users/me/Documents/workspace/mySite   
<Directory /Users/me/Documents/workspace/mySite>
  Options Indexes     
  Order allow,deny
  Allow from all 

However, accessing to localhost/mySite gives me a 403 forbidden. I have access to localhost (which I realize has its web folder at /Library/WebServer/Documents) and I have access to localhost/~me (which shows the content of ~/Sites). I also tried to deploy my site in that folders and I can have access to it, but my ideia was, at most (if configuring the site on Apache fails), to use a symbolic link there pointing to the real project location, but right now I'm also getting the same 403 with it. Can someone help me with this?


share|improve this question
up vote 1 down vote accepted

The default permissions on ~/Documents don't allow anyone but the owner access to it. Apache accesses the documents as the _www user, so if that user can't get to the web folder, you'll get a permissions error.

If this is the problem, there are a couple of possible solutions: you can either move the project folder outside of ~/Documents (e.g. /Users/me/workspace/mySite), or change the permissions on ~/Documents to allow Apache in (chmod +a "user:_www allow search" ~/Documents should do the trick).

share|improve this answer
So, you mean _www user can't access /Users/me/Documents, but it can access /Users/me? I assume ~/Sites has the same permissions that ~/Documents correct, and that is the reason why it's not working? – Rui Jan 4 '12 at 12:50
The default permissions on ~, ~/Sites, and ~/Public allow everyone read access; all of the other default folders under ~ (~/Documents, ~/Library, ~/Desktop, etc) are locked down so only the owner has any access. When you create new folders and documents, they default to being readable by everyone unless you put them in a protected location (like ~/Documents). – Gordon Davisson Jan 4 '12 at 15:25


Options Indexes FollowSymLinks


DocumentRoot /Users/me/Documents/workspace/mySite

would be useful? (See < Directory > Directive)

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.