diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-06-22 18:24:40 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-06-22 18:24:40 -0400 |
commit | c80ac481a64c2fe66aaa516352ac00a1cc6af8a2 (patch) | |
tree | 521b8b700f1bcd002b5ab033972f21982ab6511f /config | |
parent | 4a1cf603450f54d382e092df0e7445bc03dd7e5c (diff) | |
download | pfsense-packages-c80ac481a64c2fe66aaa516352ac00a1cc6af8a2.tar.gz pfsense-packages-c80ac481a64c2fe66aaa516352ac00a1cc6af8a2.tar.bz2 pfsense-packages-c80ac481a64c2fe66aaa516352ac00a1cc6af8a2.zip |
Correct grab stored values
Diffstat (limited to 'config')
-rw-r--r-- | config/apache_mod_security/apache_mod_security.inc | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc index 0663c9e9..d7e87d4e 100644 --- a/config/apache_mod_security/apache_mod_security.inc +++ b/config/apache_mod_security/apache_mod_security.inc @@ -36,7 +36,7 @@ EOF; // Setup mod_proxy entries if($config['installedpackages']['apachemodsecurity']) { - foreach($config['installedpackages']['apachemodsecurity']['config'] as $ams) { + foreach($config['installedpackages']['apachemodsecurity'][0]['config'] as $ams) { $backend_sites = ""; foreach($ams['row'] as $row) $backend_sites .= "{$row['webserveripaddr']} "; @@ -50,36 +50,37 @@ EOF; } // Set global site e-mail - if($config['installedpackages']['apache_mod_security_settings']['config']['globalsiteadminemail']) { - $global_site_email = $config['installedpackages']['apache_mod_security_settings']['config']['globalsiteadminemail']; + if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['globalsiteadminemail']) { + $global_site_email = $config['installedpackages']['apachemodsecuritysettings']['config'][0]['globalsiteadminemail']; } else { $global_site_email = "admin@admin.comn"; log_error("WARNING! Global site Administrator E-Mail address has not been set. Defaulting to bogus e-mail address."); } // Set ServerName - if($config['installedpackages']['apache_mod_security_settings']['config']['hostname']) { - $servername = "ServerName {$config['installedpackages']['apache_mod_security_settings']['config']['hostname']}\n"; - else + if($config['installedpackages']['apachemodsecuritysettings']['config']['hostname']) { + $servername = "ServerName {$config['installedpackages']['apachemodsecuritysettings']['config'][0]['hostname']}\n"; + } else { $servername = `hostname`; + } // Set global listening directive - if($config['installedpackages']['apache_mod_security_settings']['config']['globalbindtoipaddr']) { - $global_listen = "Listen " . $config['installedpackages']['apache_mod_security_settings']['config']['globalbindtoipaddr']; - if($config['installedpackages']['apache_mod_security_settings']['config']['globalbindtoport']) - $global_listen .= ":" . $config['installedpackages']['apache_mod_security_settings']['config']['globalbindtoport']; + if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['globalbindtoipaddr']) { + $global_listen = "Listen " . $config['installedpackages']['apachemodsecuritysettings']['config'][0]['globalbindtoipaddr']; + if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['globalbindtoport']) + $global_listen .= ":" . $config['installedpackages']['apachemodsecuritysettings']['config'][0]['globalbindtoport']; else $global_listen .= ":80"; } else { $global_listen = "Listen {$config['system']['hostname']}.{$config['system']['domain']}"; - if($config['installedpackages']['apache_mod_security_settings']['config']['globalbindtoport']) - $global_listen .= ":" . $config['installedpackages']['apache_mod_security_settings']['config']['globalbindtoport']; + if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['globalbindtoport']) + $global_listen .= ":" . $config['installedpackages']['apachemodsecuritysettings']['config'][0]['globalbindtoport']; else $global_listen .= ":80"; } // Mod_security enabled? - if($config['installedpackages']['apache_mod_security_settings']['config']['enablemodsecurity']) { + if($config['installedpackages']['apachemodsecuritysettings']['config']['enablemodsecurity']) { $enable_mod_security = true; $mod_security = <<< EOF <IfModule mod_security.c> |