10.4: A patch for Complete Apache installations

Jun 27, '05 09:45:00AM

Contributed by: aglzen

Tiger only hintIf 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:

  1. Download Apache 2.0.54 from here, or apache.org, if you're paranoid.

  2. Decompress the .tar file. Double-clicking in the Finder should work.

  3. 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>
    
  4. Download the patch.

  5. 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.

  6. Open the terminal, and change to the httpd-2.0.54 directory via cd, then type this:
    patch < sendrecv.c.patch
  7. 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

  8. 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.

  9. 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
  10. When that's done, type make. The package will then compile. When it's done, type sudo make install

That should be it. Start the server back up, and hopefully, you can serve large documents again!

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050614021638679