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

I've got a clean installation of OS X Lion and I'd like to start using the default instance of Apache2 that comes installed. I've started Apache and placed a dummy index.html file in both /Library/WebServer/Documents and /Users/username/Sites, but when I navigate to http://localhost/ or http://localhost/~username/ I get a 404 Not Found error.

I've checked my /etc/Apache2/httpd.conf and /etc/Apache2/users/username.conf file and everything is pointing to the right directories, but no matter what I do I can not get it to serve the files located there. Can any one shed some light on the situation and tell me what I'm possibly doing wrong?

share|improve this question
up vote 5 down vote accepted

It didn't work for me until I enabled Web Sharing in the "Sharing" Preferences. Then I was able to view content stored in /Users/username/Sites using URL http://localhost/username/

share|improve this answer
Bingo! Thanks again for the help!:) – hsatterwhite Oct 9 '11 at 19:47

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.