On Sat, 30 Jan 2010, Jeff Trawick wrote:

On Sat, Jan 30, 2010 at 8:52 AM, Dan Poirier <poir...@pobox.com> wrote:
I'm just curious, why use Define with ! rather than creating a new
Undefine directive?

same question here

No particular reason except the similarity to "<IfDefine !FOO>". I will change it to Undefine.


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}/

Reply via email to