From 559e9e3259e2c2e6a53ed84af58ff387e76042da Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 18 Jun 2012 15:44:10 +0200 Subject: [PATCH] =?UTF-8?q?Support=20de=20SetEnv=20personalis=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content index 9d85311..fdeef80 100644 --- a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/WebAppVirtualHost/50Content @@ -6,6 +6,7 @@ my $rewrite = $domain->prop('Rewrite') || ''; my $allow = $domain->prop('AllowHosts') || ''; my $preserve = $domain->prop('ProxyPreserveHost') || 'no'; my $keepalive = $domain->prop('ProxyNoKeepAlive') || 'no'; +my @env = split(/[;,]/, ($domain->prop('SetEnv') || '')); # ProxyPass ? if ($target =~ m|https?://[\d\w\.\-/]*|){ @@ -37,6 +38,11 @@ else{ $OUT .= " DocumentRoot $root\n"; } +foreach (@env){ + next unless (m/^(.*)=(.*)$/); + $OUT .= " SetEnv $1 $2\n"; +} + if ($allow ne ''){ if ($allow eq 'local'){ $allow = "$localAccess $externalSSLAccess";