Women in Technology

Hear us Roar



Article:
  Apache Web-Serving with Mac OS X: Part 1
Subject:   Fix for 404 w/ 127.0.0.1/~username/
Date:   2002-10-23 11:39:01
From:   anonymous2
Using Apache/1.3.26 (Darwin)


I had a hard time solveing this one and I saw a few other posts about it, so I thought I would pass on what I have learned.


I had a file index.html in my Users/myname/Sites folder, but when I went to 127.0.0.1/~myname/ I got a 404 error (File Not Found).


This happened because in my config.bak file the code said...


<IfModule mod_userdir.c>
UserDir public_html
</IfModule>


when it needed to say...


<IfModule mod_userdir.c>
UserDir Sites
</IfModule>


So when I overwrote my original config file with the provided config.bak I picked up this problem.


Because 127.0.0.1/~myname/ was looking for a folder named "public_html" rather than the Mac OS X default one of "Sites" as refered to in these tutorials.


So change "public_html" to "Sites" in your config file and stop and start Apache and then 127.0.0.1/~myname/ will default to your Sites folder.