Joho the Blog » Beginner-to-beginner: Restarting Apache after you’ve reinstalled Leopard from the Time Machine and your web server isn’t working

Beginner-to-beginner: Restarting Apache after you’ve reinstalled Leopard from the Time Machine and your web server isn’t working

Last night I installed a new, blank hard drive on my MacBook. I installed from Time Machine, which went quite well. (I physically installed it, booted from a Leopard system disk, partitioned the disk via Tools > Disk Utility, restarted with the Time Machine external disk plugged in, went to Tools > Restore from Backup, chose the latest backup, and came back three hours later.) The process resulted in a painless transfer. Everything was working (as far as I can tell) except for the internal web server; my browser told me that it could not connect to http://127.0.0.1. I tried lots of things, including editing my httpd.conf file, following Webby advice (how could I go wrong?). Despite multiple restarts of apache, via Systems Pref and the terminal, no dice. (BTW, I’m running Leopard 10.5.6)

My friend Billo, diagnosed the problem almost immediately: I had no apache2 directory in /var/log/. So, I made one, changed the permissions, and a minute later, it was all up and running. (Thanks, Billo!)

In case you are feeling adventurous, here are the various commands to use in the terminal. (Note: I’m not good at this stuff. I’m likely to be giving you bad advice here. Most of it is pretty much non-destructive, though. I think.)

To restart the web server (=apache2): apachectl restart (Apachectl is in /usr/sbin/)

To create an apache2 directory in /var/log:

cd /var/log/
mkdir apache2
chown root apache2
chmod 755 apache2

It may take a minute or two for things to start working. If they do, when you go to http://127.0.0.1 in your browser, you should get a default page telling you that apache is working. And you’ll probably have to log in as root in the terminal to get permission to do this stuff.

Good luck. And, most important, don’t blame me!

[Tags: ]

2 Responses to “Beginner-to-beginner: Restarting Apache after you’ve reinstalled Leopard from the Time Machine and your web server isn’t working”

  1. I would not rely in Time Machine for a complete copy- next time try a cloned like SuperDuper or Carbon Copy Cloner

  2. It seems that the author’s intention was to perform a clean reinstall of the operating system on a new, larger hard drive, while retaining all personal data, application, etc. I plan on doing the same thing soon. SD or CCC would not serve this purpose, but is more suitable for a true backup solution.

    Perhaps it might have been smoother to do a clean install on the new drive, and plug the old drive into an enclosure, then use the migration assistant to grab the data off there. The only problem I’ve had with that route was upgrading from 10.4 to 10.5 via that route, I ended up losing a whole bunch of registration keys and had to re-register many of my programs. That was probably just due to changing versions of OS X, though.

    Thank you for this. I’m sure it will be helpful when I finally grab a new hd and ram and upgrde my aging machine (Late 2007 MBP 15″).

Leave a Reply


Web Joho only

Comments (RSS).  RSS icon