I was stuck with a problem I encountered a few weeks ago when I got back from my holiday. I was trying to post my holiday snapshots on my webserver to show to my friends, when I noticed that the big pictures didn’t want to load completely in the browser. They only downloaded for about 1/3 in the browser and I had to refresh the page several times to get the full photo. I’ve been banging my head on this for some time until David W. pointed me to a bug in Apache 2.0.54 that caused the error. He also explained how I could upgrade to 2.0.55 and keep all the things I had configured with the package from Server Logistics in place. If you have the Apache package running from them you might as well follow these instructions as well.
First download Apache HTTP server version 2.0.55. Unpack it into a directory and open the file config.layout
for editing and add the following code at the end of the file.
<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>
This configures the build and configuration process to mimic the configuration used by ServerLogistics and keeps everything in place as it is. If you’ve done that then open a Terminal session, change to the directory in which you unpacked the source code and edited the config.layout
file and run the following command:
./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
This will create and configure the Makefile for actually building the Apache webserver like the package from Server Logistics. When it’s done just execute the next command:
make
When that’s finished and you are sure (made a backup of your system and all) you can issue:
sudo make install
Stop and start Apache and you are running the new 2.0.55 version. Don’t do a restart as that just reloads the configuration. Use the Apache preference pane you installed earlier to stop and start it or use the apachectl
command in the Terminal as a root user.
- No related posts
March 4th, 2006 at 2:41 am
Apache is now up to version 2.2.0. Have you had a chance to test it yet?
Is it compatible with the Server Logistics package?
Richard5: I haven’t tested it yet but it’s on the agenda for the coming time. If you use the above instructions the result will be compatible with the Server Logistics package.
March 20th, 2006 at 6:38 am
If you’re keeping your old (2.0.48 in our case) httpd.conf, note that you now need a “LoadModule ldap_module” before the existing “LoadModule auth_ldap_module” line.
Failure to do this will give you a server that fails to start up — but it will thankfully log a helpful message in errors_log.
We didn’t need LDAP, so I just commented out the old line …
March 28th, 2006 at 6:22 pm
I get the error
configure: error: no acceptable C compiler found in $PATH
See `config.log’ for more details.
configure failed for srclib/apr
Please assist…
April 5th, 2006 at 9:36 pm
Thanks for this tutorial, Richard. Sad to say, I’ve never actually compiled anything from source before. I was nervous about messing up my server setup (server logistics installations), but your article here was easy to follow. Everything worked perfectly!
You are a lifesaver… I had an angry mob hunting me because they couldn’t get their 64kb+ files from our server
Thanks again!
CHRIS
July 27th, 2006 at 7:35 pm
Actually it will compile Apache 2.2.x VERY well and quite quickly. However, five modules have gone away, or were renamed, and fifteen others have been added. Not to mention that you MUST recompile PHP, and (of course) any other 3rd party modules that you are using.
I tried this. Wow what a mess. So now I’m using 2.0.58 with the settings that Richard provided. Thank you.
August 8th, 2006 at 8:40 pm
On 10.3.9, running XCode 1.5 (not sure that would have any relevance), these patches do not work for 2.0.55 or 2.0.59. The make install step complains that libtool lacks a destination. Googling showed precious little, although there was an intriguing but AFAICT unresolved issue with building a Tomcat (?) module (mod_jk). Thoughts?
August 9th, 2006 at 5:48 am
OK, my bad, but an odd one. After spending LOTS of time digging through the build files and experimenting, I tracked the problem down to a missing installbuilddir. Tracking back up led me all the way to the first step, where I had copied Richard’s ServLog layout in Safari and pasted it into the terminal window where I was editing config.layout. Lo and behold, the copy/paste somehow errored, copying ‘installbuilddir’ as ‘instalbuildir’. It also copied ‘error’ as ‘eror’. These are the only 2 lines in the layout that have a double-letter, so it is some bug in the tools I was using at the time.
Fixing this, it all now builds fine (2.0.59) on 10.4.7, FWIW (my earlier reference to 10.3.9 and Xcode 1.5 was misleading).
May 9th, 2007 at 1:41 am
Worked for 2.0.59.
Thanks.