On 30.01.2010 19:40, Stefan Fritsch wrote:
A related question: I want to introduce a directive to set variables
that are expanded during config file parsing, just like environment
variables are. The problem I want to solve is that environment variables
cannot be changed during graceful restart. Would it be better to
overload 'Define' or to introduce a new directive? DefineVar, SetVar?
Example config of what I want to achieve:
<IfDefine !TEST>
Define SERVERNAME www.example.com
Define BACKEND 1.2.3.4
</IfDefine
<IfDefine TEST>
Define SERVERNAME www-test.example.com
Define BACKEND 1.2.3.5
</IfDefine
...
ServerName ${SERVERNAME}
SSLCertificateFile ssl.crt/${SERVERNAME}.crt
SSLCertificateKeyFile ssl.key/${SERVERNAME}.key
ProxyPass / http://${BACKEND}/
ProxyPassReverse / http://${BACKEND}/
I ported mod_define to 2.0/2.2 a few years ago. You can have a look at
http://people.apache.org/~rjung/mod_define/mod_define-current-src.tar.gz
It was originally written by Ralf S. Engelschall and distributed as part
of the mod_ssl distribution for Apache 1.3. After approval by Ralf I
published the port under the AL 2.0.
Regards,
Rainer