| destroyedlolo 2007-06-13, 7:26 pm |
| 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 :
<VirtualHost *:8001>
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
</VirtualHost>
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
|