Created attachment 28577 [details] variable sbindir In order to be easily relocatable, make apachectl use a variable sbindir. That way we can ./configure --prefix=/opt/foo && make && make install and then cp -r /opt/foo /opt/bar and have a new instance to run with.
I have made slight modifications to this patchset -- to actually work. - But of course it only works with the default layout: bin/apachectl: HTTPD="$SBINDIR/httpd" # # pick up any necessary environment variables if test -f $SBINDIR/envvars; then . $SBINDIR/envvars fi if test "x$SERVER_ROOT" != "x"; then HTTPD="$HTTPD -d $SERVER_ROOT" fi bin/envvars: envvars=$( readlink -f $0 ) export SERVER_ROOT=${envvars%*/*/*} conf/httpd.conf: ServerRoot "${SERVER_ROOT}" DocumentRoot "${SERVER_ROOT}/htdocs" # .. etc..