httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Cramer <>
Subject [PATCH] allow implicit ServerRoot via apxs
Date Fri, 31 Oct 2003 20:40:47 GMT
Currently, if your local httpd.conf doesn't contain a ServerRoot 
directive but has relative-paths to things like DSO modules, 
Apache::Test fails. Obviously, a ServerRoot is necessary for Apache to 
function properly, but the ServerRoot directive is only one of several 
ways to set it.

Once nice trick for making a config file that will run on several 
versions of Apache (or even different server architectures) is to make 
all architecture-specific paths (mainly to DSO modules) relative to 
ServerRoot, while generic, architecture-agnositic paths are absolute. 
You then rely on the path compiled into httpd (via the "--prefix" 
configuration option) to find your DSOs.

The easiest way I've found to do this in Apache::Test is attached. It 
extracts the "PREFIX" from apxs and uses that as the default inherited 
ServerRoot value. If a value is hard-coded into the global httpd.conf, 
it supercedes the apxs value and everything works just like before.

The patch is against 1.05 and I tested it with Apache 1.3.29 and 1.3.28.

Mike Cramer | AIM: MikeWebkist

View raw message