Hello
I have searched all over the place, but can't find an explanation for
the following.
I am trying to set different environment variables depending on what
what directory the accessed cgi script is in.
/var/www/cgi-bin/live/report.cgi
/var/www/cgi-bin/test/report.cgi
where report.cgi simply is
print $ENV{'USERSOURCE'}
I thought by adding the following to my httpd.conf file and stopping
and then starting /etc/init.d/httpd the scripts would give me
different outputs.
<Directory "/cgi-bin/live/">
SetEnv USERSOURCE live
</Directory>
<Directory "/cgi-bin/test/">
SetEnv USERSOURCE test
</Directory>
However, I can only get the variable set if I use SetEnv OUTSIDE of
the <Directory> tags (and is therefore global). I have run httpd -t to
check the syntax and all that works. Can anyone tell me why you cannot
set specific environment variables based on the directory directive?
Thanks for your help and attention
Mark
