So I use my Mac for web development, and I just use the Apache web server that’s already present in OS X. Anyway, everything was dandy and working smoothly. My hard drive was filling up in my Macbook Pro, so I beefed it up with a 250 GB drive installed by CompUSA. (For only $29.99 by the way, and it stays under warranty. Sweet.)
Anyway, I thought it’d be a great time to test the Time Machine backup system. I had a backup to the Time Machine disk in case there were still issues with the Time Machine restores, but it seemed to restore everything perfectly. That is, until I tried to load back up some websites yesterday. Since then, I have spent probably 12 hours trying to figure out why http://localhost/ and http://127.0.0.1/ came up in Safari as if the server were off. Well, that’s because it never started, and here’s why…
Time Machine, for whatever reason, did not restore a crucial folder that Apache needs to write its error logs. Specifically, it’s the folder /private/var/log/apache2. If you’re having this same problem, open up Console and notice the errors popping up. Apache’s trying to start up, and it halts everytime with an error that looks something like this:
11/29/07 4:00:22 PM org.apache.httpd[1257] (2)No such file or directory: httpd: could not open error log file /private/var/log/apache2/error_log.
Anyway, the fix is simple. Open up Terminal and type this:
sudo mkdir /private/var/log/apache2
You’re welcome.









Interesting. So Time Machine restored everything? Apps, preferences, all of them?!
Yeah, it restored everything beautifully except for the /private/var/log/apache2 folder. I wonder why Apple excluded that folder from the backups…
Yessss! Thanks a million!