httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eli Marmor <>
Subject Annoying Installation Problem and a Possible Elegant Solution
Date Tue, 11 May 1999 13:07:19 GMT
Hi again,

This time I'm with a solution for an annoying installation problem
and not with more ideas about SSL and the American law  ;-)  (sorry
for the previous proposal; IANAL, and I also learned a new word :-)

Before going on, let me clarify: I am not a newbie. The reason that
I show the following problem, is not to get a solution (I know that
this is not the right place to ask questions); I already have a
solution, but I want to share it with you, and (hopefully) to have
it in the standard distribution (maybe 1.3.7 ?). I apologize if this
problem was resolved already; I searched the public places and could
not find anything. If there is another solution, I'll be grateful if
it can be more public.

The most annoying installation problem for me, and I believe that
for most of the Apache users/administrators/integrators/etc., is
that a part of the configuration is done BEFORE the build, and some
of the results are hard-coded into the generated files, sometimes in
binary files (such as httpd). While it is possible to override these
values (for example by flags), some of the tools don't allow to use
flags (e.g. apachectl).

According to frequent answers, the only way to re-configure Apache,
including path of config file and other configuration details, is to
re-run configure. Unfortunately, it requires a full re-build,
including make and "make install". In some cases it only annoys; In
other cases, it is even impossible. Many computers lack required
stuff for build, like compilers, and the installers would want to
install Apache from a binary package, even under a different
directory and/or configuration. Sometimes, the original directory is
already used. Sometimes, the installer does not have a root access,
so he can't use the same directory. And sometimes there is another
server (like a production server) which already runs in that
directory, and the new (experimental installation) should be done in
another location. Sometimes there is already an installation of
Apache which we want to move to another directory.

And think about the maintainers of pre-built packages of Apache:
Currently, all of them state that "sorry, but the current version
must be installed under the following directory...".

In any case, it is not acceptable that in order to change some of
the default settings of Apache, it is required to re-compile it. We
are used to do it with Linux kernel, but Apache should be able to
be packaged in a way that will allow it to be more flexible.

Now, let me propose two things; The first is simple and can be
implemented very easily (details follow) but resolve only half of
the problem, and the second is a complete solution.

A partial solution: This ways doesn't require you to re-compile
Apache, but it still requires the original tree, the "configure"
stuff, a "make install", and resolves problems only for

Makefile should detect, when the user asks "make install", that a
re-configuration was done AFTER the last build (for example, by
comparing dates with "", or by comparing values of
"prefix"). In such a case, sed will be used to replace all the
instances of "$HTTPD" in apachectl by
"$HTTPD -f path-of-the-new-config-file".
I tried this solution, and it worked perfectly for me (though I
still didn't write an automatic script, but did the things

A more advanced (and complex) solution, will allow users to move the
whole Apache tree (not the source tree!) from a directory to a
directory, and even from a computer to a computer (powered by the
same OS). This solution assumes that everything is contained in the
same hierarchy (although it can be improved). In this solution,
after moving the tree to another location, a script will be run.
The effect of this script will be a bit similar to the effect of
"make install-support" and "make install-config". It will not copy
and/or install files, but it will sed and modify files to fit the
new configuration. Of course, it will require the binary tree to
include the "-dist" files in addition to the final files (since some
information is missing in the final files, like the "@@ServerRoot@@"
strings). In addition, the apachectl file (and possibly other files)
should be patched as I described above (replacement of all of the
instances of "$HTTPD" by "$HTTPD -f path-of-the-new-config-file").

I could attach a code for these two ways, but I think that it will
be better if one of the APACI/Makefile/configure experts (Ralf?)
will do it. At least, I tried to describe the ways in details,
almost like in algorithm.

Eli Marmor
 *   ___ _  __ ___  __    _ |__ _ _      *
  *     | | | \   | | \    |  / |\/     El-Mar Software Ltd.    *
   *    | | | _)  | | _)     /  | \      Tel.: 972-50-237338     *
    *    ___________________________      Fax: 972-9-766-1314     *
     *   \_________________________ \  *
      *    _________  __  ____     \ \____  __    _                 *
       *   \_______ \ \_\|  _ \  __ \____ \ \ \  | |                 *
        *          \ \   | | \ \ \_\     \ \ \ \ | |                *
         *          \ \  | | _\ \         ) ) \ \ \_\_             *
          *          \ \ |_| \___)       (_/   \_\  \_\           *
           *          \ \_______________________________         *
            *          \________________________________\       *
             *                                                 *

View raw message