Using a variable in Apache"s configuration ?

Using a variable in Apache"s configuration ?

am 14.06.2007 00:41:41 von destroyedlolo

Hi,

I'm hosting several virtual host on my Apache 2.2.4, and they share many
PHP scripts. In order to distinguish each site in scripts, I'm setting
an environment variable as following :


DocumentRoot /web/hebergement/mysite
SetEnv Site_id mysite

# CustomLog /web/logs/mysite/access_log combined
# ErrorLog /web/logs/mysite/error_log

##### definitions partagees par tous les hebergements
Include conf/LF/hebergement.conf



The included 'hebergement.conf' contains many apache directive shared by
all sites (Alias, Authentication, ...).

How should I use my variable in this configuration file.

As example, something like if shell syntax was applicable :

AuthDBDUserPWQuery "select passwd from ${Site_id}.comptes where id = %s"
Alias /local_php /web/scripts/${Site_id}

Thanks

Laurent