diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-06-22 23:51:55 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-06-22 23:51:55 -0400 |
commit | f996d1638086f93a9200b683882aa5396302b3f9 (patch) | |
tree | 6bc29e429c3daf016343b389430187202146296d | |
parent | d3d8b347dd7a02f4fb3014d01d7cbd1069b8663b (diff) | |
download | pfsense-packages-f996d1638086f93a9200b683882aa5396302b3f9.tar.gz pfsense-packages-f996d1638086f93a9200b683882aa5396302b3f9.tar.bz2 pfsense-packages-f996d1638086f93a9200b683882aa5396302b3f9.zip |
Misc formatting and only set variables if they exist. Use global email if local email not set.
-rw-r--r-- | config/apache_mod_security/apache_mod_security.inc | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc index d5598c2c..0c8ff9a3 100644 --- a/config/apache_mod_security/apache_mod_security.inc +++ b/config/apache_mod_security/apache_mod_security.inc @@ -68,7 +68,8 @@ ProxyRequests off EOF; - /* ##################################################### + /* + ##################################################### # Format for the Proxy servers: # Please do not delete these from the source file # in any "cleanups" that you feel you are performing. @@ -100,16 +101,21 @@ EOF; // Setup mod_proxy entries $mod_proxy if($config['installedpackages']['apachemodsecurity']) { foreach($config['installedpackages']['apachemodsecurity']['config'] as $ams) { - $backend_sites = ""; // Set rowhelper used variables foreach($ams['row'] as $row) $additionalsitehostnames .= "{$row['additionalsitehostnames']} "; + $backend_sites = ""; foreach($ams['row'] as $row) $backend_sites .= "{$row['webserveripaddr']} "; // Set general items - $serveradmin = $ams['siteemail']; - $primarysitehostname = $ams['primarysitehostname']; - $additionalsitehostnames = $ams['primarysitehostname']; + if($ams['siteemail']) + $serveradmin = $ams['siteemail']; + else + $serveradmin = $global_site_email; + if($ams['primarysitehostname']) + $primarysitehostname = $ams['primarysitehostname']; + if($ams['primarysitehostname']) + $additionalsitehostnames = $ams['primarysitehostname']; $sitename = str_replace(" ", "", $ams['sitename']); // Set local listening directive if($ams['ipaddress'] && $ams['port']) @@ -135,8 +141,8 @@ EOF; if($primarysitehostname) $mod_proxy .= " ServerName $primarysitehostname \n"; if($backend_sites) { - $mod_proxy .= " ProxyPassReverse /{$sitename} {$backend_sites}\n"; - $mod_proxy .= " ProxyPass / {$backend_sites}\n"; + $mod_proxy .= " ProxyPassReverse /{$sitename} {$backend_sites}\n"; + $mod_proxy .= " ProxyPass / {$backend_sites}\n"; } $mod_proxy .= "</VirtualHost>\n"; // End VirtualHost |