If you were using the excellent Complete Apache packages, you probably had a rude awakening when you realized that they have a serious bug that doesn't serve any files larger than about 50KB. This makes images, in particular, a problem.Assuming you're running a stock installation, here are step-by-step instructions on how to upgrade apache to 2.0.54, apply a patch to fix the bug, and get your installation working again. I've simply collected the instructions from the people over in the Server Logistics forum, and the folks working on Apache. Credit for fixing this goes to them.
Here's what you need to do:
- Download Apache 2.0.54 from here, or apache.org, if you're paranoid.
- Decompress the .tar file. Double-clicking in the Finder should work.
- Open the config.layout file, and add the following lines to the end:
<Layout ServLog> prefix: /Library/Apache2 exec_prefix: ${prefix} bindir: ${exec_prefix}/bin sbindir: ${exec_prefix}/bin libdir: ${exec_prefix}/lib libexecdir: ${exec_prefix}/modules mandir: ${prefix}/man sysconfdir: ${prefix}/conf datadir: ${prefix} installbuilddir: ${datadir}/build errordir: ${datadir}/error iconsdir: ${datadir}/icons htdocsdir: ${datadir}/htdocs manualdir: ${datadir}/manual cgidir: ${datadir}/cgi-bin includedir: ${prefix}/include localstatedir: ${prefix} runtimedir: ${localstatedir}/logs logfiledir: ${localstatedir}/logs proxycachedir: ${localstatedir}/proxy </Layout> - Download the patch.
- Copy the patch file sendrecv.c.patch to your httpd-2.0.54 folder. If Safari has renamed it sendrecv.c.patch.txt, go ahead and rename it back.
- Open the terminal, and change to the httpd-2.0.54 directory via cd, then type this:
patch < sendrecv.c.patch - You might be prompted as to which version of the sendrecv.c to use. If so, type the path of the file that doesn't end in .old
- Next, you want to configure and compile Apache. Make sure your server is shut down! If you're the paranoid type, make sure you have all the backups you need to feel safe at night.
- Still in the terminal, type the following (it's all one long line; the backslashes should let it be copied and pasted):
./configure --enable-layout=ServLog --enable-mods-shared=all \ --with-ssl=/usr --with-mpm=prefork --enable-ssl --enable-dav \ --enable-cache --enable-proxy --enable-shared --disable-static \ --disable-unique-id --disable-ipv6 --enable-logio --enable-deflate \ --with-ldap --with-ldap-include=/usr/include --with-ldap-lib=/usr/lib \ --enable-ldap --enable-auth-ldap --enable-cgi --enable-cgid \ --enable-suexec - When that's done, type make. The package will then compile. When it's done, type sudo make install

