* * * * *

                           Playing nice together …

I've been working on a project the past week or so and one of the components
has me attempting to compile a version of Apache [1] with mod_ssl [2],
mod_perl [3] and mod_php [4] (in this case, PHP4). It certainly has been an
educational experience.

I found out the hard way that one of the modules (I think it was mod_ssl,
although I can't confirm it) reran the configuration script for Apache,
resettting it to use the default Apache file locations and not the locations
I configured it for (I'm building a test version of Apache and I'm doing it
as a regular user so I don't destroy the working configuration on the
computer I'm doing this on).

Hack hack hack, I decide to install everything by hand and avoid the Apache
Configuration Interface that seems to be causing the problem. Hack hack hack
and I finally get an executable to build.

It seems to work, except that mod_info [5] isn't working. It comes with
Apache but normally isn't enabled. I had thought I enabled it, but apparently
not. I check the configuration file (the one used to build Apache, not to
start it running) and it seems to be using the one for the Apache
Configuration Interface, so I problably ended up with a server that only has
mod_ssl.

Okay, start over.

I'm getting farther. This time I'm getting problems compiling mod_php. It
can't find certain include files. I add the appropriate locations to the
configuration file and it's still not working. It doesn't look like it likes
being added by hand. Guess I'll have to use the Apache Configuration
Interface to add mod_php.

Now, why Apache has two different configuration files, one used only if you
use the Apache Configuration Interface, and one used only if you don't use
the Apache Configuration Interface at all, is beyond me. Okay, I can work
around that, but more annoying is that whenever you run the configuration
script, it will rewrite the configuration file over. So if you, say, forget
to enable mod_info and you rerun the configuration script to enable it,
you'll get an Apache with mod_info enabled and any other module that is
optional, gone.

Now, there's a separate script you can run that will avoid this problem, but
do any of the module installation scripts (for say, mod_ssl or mod_perl) use
this, or even mention it? Nay, I say. Nay!

Okay, start over yet again.

So now it's down to figuring out which third party modules run the
configuration script and which ones don't, and make sure to install them in
the right order, and double check that my preferred file locations aren't
overwritten. mod_ssl gets installed first, even though it wants to be last to
make sure any authentication goes through it. Then mod_php and finally
mod_perl.

Fun fun fun.

[1] http://httpd.apache.org/
[2] http://www.modssl.org/
[3] http://perl.apache.org/
[4] http://www.php.net/
[5] http://httpd.apache.org/docs/mod/mod_info.html

Email author at [email protected]