Apple Update Clobbers Apache

If you’ve customized the version of Apache running on your Mac OS X box, please continue to the next section entitled Restoring Your httpd.conf File. If you have not customized Apache, please scroll down to the next sub-section entitled Monkey Makes a Snowball, where you will find subject matter more suited to your tastes.

Restoring Your httpd.conf File

In typical fashion for Apple, the Mac OS X 10.2.4 update will, when installed, overwrite your existing /etc/httpd/httpd.conf file with Apple’s own version (which includes support for the Rendezvous module).

Also in typical fashion for Apple, the Mac OS X 10.2.4 update saves a backup copy of your old /etc/httpd/httpd.conf.applesaved. You may compare the two files using the (built-in) UNIX utility diff from the command-line in Terminal.

You probably don’t want to just copy the old file over the new file, as you’d lose Apple’s latest addion, a module supporting the Rendezvous module. Rather, you want to integrate the changes you made in your older file into the new one.

If you have BBEdit, you may open both files and use theFind Differences command from the Search menu in BBEdit. Just import the changes to the old file, save the new file to your home folder, su to root, and copy the updated file into place. Most likely Gruber will have written an Applescript to do this by the turn of the hour.

[UPDATE: Gruber’s AppleScript to do diff in BBEdit]

If you don’t have BBEdit, you can use a UNIX utility from the command-line in Terminal. If you are unfamiliar with using UNIX utilities from the command-line in Terminal, please skip down to the next sub-section entitled Monkey Makes a Snowball, where you will find subject matter more suited to your tastes.

From a prompt, just cd into /etc/httpd and type diff httpd.conf httpd.conf.applesaved, note the results, and implement the changes (just the uncommenting of several lines in the new file, and the addition of an AddType declaration. Just note these changes and use vi (and never Emacs) to add them to the new file, being sure to su before editing the file.

Then just restart apache using the apachectl graceful command (which should already be in your path), and you’re set.

Monkey Makes a Snowball



Hey, look — it’s a monkey. Monkeys are fun! This monkey made a snowball. Don’t you want to make a snowball too?

Monkey with Snowball

More articles in the Archive →