Compile once, install to multiple places

>>From what I can see, you pick a --prefix-dir when compiling Apache, and
to documentation) must install to that directory in order for the
product to work.
This suggests that the path (and those derived from it) get embedded in
binaries, modules and configuration files.

This can be awkward, as the target directory may not be known at
compile time,
and/or, the product may be installed more than once on the same server
(and possibly patched and/or configured differently for different
Or, perhaps the binary is on shared storage, mounted at different
places by
different client machines.

IBM appear to addressed the issue in IBM HTTP Server (derived from
You can install to a directory of your choosing, and multiple times
too, and it works.

Q1: How deep do the prefix directories get embedded within Apache at
compile time?
Q2: Why is this?
Doesn't seem defendable from a flexibility perspective.
Doesn't seem necessary (given IBM's example).
Q3: Is there any hope for this going away in future?
Q4: Has anyone worked around this already?
Perhaps by specifying a relative prefix-dir?

I ran strings on various binaries and modules and didn't find much in
the way
of prefix-dir related path information.

{{{ Andy


Relevant Pages

  • Re: [PHP] Question before upgrading to 5
    ... anyway I see you did do a dual apache setup, cool, and got it working properly. ... but it sure is a cool trick if you really need to run php4 sites and php5 sites on one production ... install of apache would allow you to do. ... php in so far as you can also specify a custom prefix to have ...
  • Re: PHP Tutorials
    ... >> In this tutorial we assume that your server has activated support for PHP ... install a web server locally (not just Apache). ...
  • Re: Two newbie questions
    ... Apache to install OK but when I then tried to install PHP ... The packages mean it generally takes less skill and effort to install - ...
  • Need Help with Adding mod_ssl to Apache
    ... Solaris 9 system and I am using the relevant version of mod_ssl. ... rather than to install the web server from another source. ... Well, first of all, why are you using the Sun Freeware apache? ...
  • Re: Upgrade Fedora Core 3 to Fedora Core 5 Help please
    ... I run from apache for my family website. ... some of the nice new features that I hear about with Fedora Core 5. ... don't work anymore would be a real problem. ... Format and install fresh would be a real nice way to go and I ...