You already read that lately I had to restore the data of my Mac using a Time Machine backup.
Everything seemed to work fine but I recently found that Web Sharing (Apache Httpd) was no longer working.

I had a look in the console and I found those lines:

06/01/08 12:21:25 com.apple.launchd[1] (org.apache.httpd) Unknown key: SHAuthorizationRight
06/01/08 12:21:27 org.apache.httpd[1405] httpd: Could not reliably determine the server’s fully qualified domain name, using 192.168.1.2 for ServerName
06/01/08 12:21:27 org.apache.httpd[1405] (2)No such file or directory: httpd: could not open error log file /private/var/log/apache2/error_log.
06/01/08 12:21:27 org.apache.httpd[1405] Unable to open logs
06/01/08 12:21:27 com.apple.launchd[1] (org.apache.httpd[1405]) Exited with exit code: 1
06/01/08 12:21:27 com.apple.launchd[1] (org.apache.httpd) Throttling respawn: Will start in 10 seconds

Apparently something went wrong when opening the log files.

So, I went to “/private/var/log/” and found out the “apache2″ folder was missing. So I created it using a Terminal and it solved my problem:

cd /private/var/log
sudo mkdir apache2


17 Comments to “Get Apache working after a Time Machine restore”  

  1. 1 steve

    Thanks for this! I just did my first Time Machine restore and I’m getting the same error. I’ll trackback to your post…once I get my blog restored!

  2. 2 Aaron

    Thank you thank you thank you! You’re a lifesaver.

  3. 3 Jason

    I was searching for this answer all day. Much thanks!

  4. 4 Julien

    Thanks mate !!!

  5. 5 Evan

    Fantastic, I’d have been hunting for hours! This little issue can be added to pile of bugs with the restore feature. Thanks for posting your solution!!

  6. 6 Thomas

    I’ve tried your solution, and another that attempts to do the same thing. I really don’t know anything about Terminal or Console. With TinkerTool, I made those folders visible, and saw that I was indeed missing an apache2 folder or .log file (which ever I need, you said folder) in the folder you mentioned. This is what I get:

    DurfPro:~ Thomas$ /private/var/log
    -bash: /private/var/log: is a directory
    DurfPro:~ Thomas$ sudo mkdir apache2
    sudo: /etc/sudoers is mode 0644, should be 0440
    DurfPro:~ Thomas$ sendmail: fatal: chdir /private/var/spool/postfix: No such file or directory

    The line “/etc/sudoers is mode 0644, should be 0440″ looks like permissions to me, but my account is an admin, and I tried it under my other admin account. Same results.

    Do I need to run it with Root permissions, or whatever? How would I do that?

    I changed the permissions of the /private folder via Finder, Get Info. That didn’t help.

    I also created a new folder named apache2 from within Finder, since that’s what it looks like we are trying to do.

    ( mkdir = make directory? )

    Any ideas?

  7. 7 Thomas

    After an hour long phone call to AppleCare, and not getting a fix, but they did help point me in the right direction. They sent me a link to a page on apple.com for Leopard Server that showed me a bunch of files that dealt with Apache, and where they are located. Well, I tried to copy missing files from my roommate’s MacBook Pro, ran the Permissions Repair in Disk Utility, watched Console try to access various files, and peeked at those, tried changing permissions to those files, and yet, still no results.

    AppleCare’s initial solution was, “Archive and Install”. Which is their solution to everything. Even a WiFi issue I’ve been having since 10.5.6 came out. There is now a patch that seems to have fixed it. (after I went hardwired, changed the phone jack to an RJ-45 jack, and connected it to my router in the Smart Box)

    Either way. I’m up now. I downloaded the 10.5.6 update from apple.com/downloads, not the Software Update app. Repaired Permissions before it finished downloading, installed, restart, working.

    I’m not sure if any of the tinkering I did beforehand helped, but I’d try the download and install 10.5.6 update first if the Terminal command isn’t working.

    I got that to work btw. I tried not typing sudo in the command, and it worked.

    mkdir /private/var/log/apache2

    Thanks for pointing me in the right direction!

  8. 8 rompelstilchen

    Solve my issue, thanks a lot !

  9. 9 JGSaxon

    Much obliged, I found my answer to the question!!!
    Thanks

  10. 10 Matt

    Huge help; muchos gracias. I owe you a beer.

  11. 11 Lance

    Hey that’s fantastic!! Good find thanks heaps ;)

  12. 12 heal fat lip

    Thank you for sharing the information. I found the information quite helpful.

  13. 13 Nexus

    Dont speack so much english, but i understand your explication, and its fantastic, thanks

  14. 14 Ivan

    thanks!

  15. 15 Lyn

    Thanks for this information. Saved me a LOT of time!!

  1. 1 less is more » Blog Archive » Time Machine…
  2. 2 Another thing Time Machine forgot to restore at Pierre-Arnaud Marcelot’s Blog - pajbam.com


Leave a Reply