On Fri, Mar 08, 2002 at 04:12:39PM -0500, Rodent of Unusual Size wrote:
> Let me clarify: By putting absolute paths into the config
> files, we are locking the installation into a single location.
> By using ServerRoot-relative locations, as we always have, the
> installation can be moved around the filesystem, or even to
> another box.
>
> Now, if the $foodir values can be defined as ServerRoot-relative,
> at least for some layouts (like the default), then I'm of
> the other opinion, and +1 on the idea. But absolute paths? No way!
Thom and I have had to deal with this lately and came up with a couple
of m4 macros to help:
APR_EXPAND_VAR takes a variable and recursively interpolates the contents.
Useful for when datadir='${foodir}/bar'.
APR_PATH_RELATIVE takes a path and a prefix var and strips off the prefix
(and any extra / characters) if they share a common prefix, else it
takes the literal of the original path.
I'm thining that to deal with apachectl, apxs, httpd-std.conf, etc... we'll
have to come up with a couple sets of variables that parallel their $prefix
counterpars. For example:
prefix = '/path/to/apache2'
sysconfdir = '${prefix}/conf'
ap_sysconfdir = '/path/to/apache2/conf'
rel_sysconfdir = 'conf'
We then export these with APACHE_SUBST and then turn httpd-std.conf into
an autoconf input file ala apachectl and apxs. Anyone see a problem with
this approach?
-aaron