Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.