Apache Server configuration support - Using a variable in Apache's configuration ?

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > June 2007 > Using a variable in Apache's configuration ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Using a variable in Apache's configuration ?
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
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com