Thx for the reply. If I understand the gist of what you propose, it consists of setting environment variables that specify the Apache bin path, and its log path. Those env vars can then be accessed in the conf file using the ${VARIABLE} syntax. I guess that would do the trick, thx. But I was hoping for a more automated way. It seems kind of silly to setup conf variables to tell the httpd.conf file stuff about the instance of Apache that’s compiling it in the first place. You would think that there would be a syntax for retrieving that more directly. Oh well. Alain From: marcos [mailto:chipcmc@xxxxxxxxx] Define one file wiht variables definition, name file examplo =setVarApache.env in path /tmp $more setVarApache.env LOG_PATH=/tmp/example/ LISTENIP=192.168.100.1 NAMESERVER=MyServer LISTENPORT=82 Now in script to start apache i charge this file with: . /tmp/setVarApache.env case $ARGV in stop|restart|graceful) $HTTPD -f /opt/apache2/httpd.conf -k $ARGV ERROR=$? ;; start|startssl|sslstart|start-SSL) $HTTPD -f /opt/apache2/httpd.conf -k start -DSSL ERROR=$? ;; configtest) $HTTPD -f /opt/apache2/httpd.conf -t ERROR=$? ;; status) $LYNX $STATUSURL | awk ' /process$/ { print; exit } { print } ' ;; fullstatus) $LYNX $STATUSURL ;; list) $HTTPD -f /opt/apache2/httpd.conf -S 2>&1 | grep namevhost | awk '{print $4}' ;; *) $HTTPD -f /opt/apache2/httpd.conf $ARGV ERROR=$? esac and in httpd.conf <VirtualHost ${LISTENIP}:${LISTENPORT}> ServerName $NAMESERVER CustomLog "|/opt/apache2/bin/rotatelogs ${LOG_PATH}/access-${SERVERNAME}.log 86400" wusage </VirtualHost> if you has diferente machines, you can use name of host in name of file: setEnv_HOSTNAME.env at this way you can use the same script: . setVarApache_$(uname -n) 2012/1/25 Desilets, Alain <Alain.Desilets@xxxxxxxxxxxxxx> A related question to the one I posted earlier about env variables. |