diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-06-21 21:57:25 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-06-21 21:57:25 -0400 |
commit | 5b001cdce1987a38367e27b2ca0147df18aec789 (patch) | |
tree | 432a3bd5013762d1fc52280e471c2bdafc9f7aa7 /config/apache_mod_security | |
parent | ee36ee57be618fe0014d35c5d28ce5e65b6afe13 (diff) | |
download | pfsense-packages-5b001cdce1987a38367e27b2ca0147df18aec789.tar.gz pfsense-packages-5b001cdce1987a38367e27b2ca0147df18aec789.tar.bz2 pfsense-packages-5b001cdce1987a38367e27b2ca0147df18aec789.zip |
Do not mount rw every time file is sourced. Fix comments.
Diffstat (limited to 'config/apache_mod_security')
-rw-r--r-- | config/apache_mod_security/apache_mod_security.inc | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc index 5ae1b198..0663c9e9 100644 --- a/config/apache_mod_security/apache_mod_security.inc +++ b/config/apache_mod_security/apache_mod_security.inc @@ -1,14 +1,12 @@ <?php -// Syntax:ProxyPreserveHost On|Off - -global $config, $g; -conf_mount_rw(); -if(!is_dir("/usr/local/apachemodsecurity")) +if(!is_dir("/usr/local/apachemodsecurity")) { safe_mkdir("/usr/local/apachemodsecurity"); + conf_mount_rw(); +} function apache_mod_security_install() { - + global $config, $g; } function apache_mod_security_deinstall() { @@ -21,9 +19,11 @@ function apache_mod_security_resync() { generate_apache_configuration(); } +// Generate mod_proxy specific configuration function generate_apache_configuration() { global $config, $g; - // Generate mod_proxy specific configuration + + // Syntax:ProxyPreserveHost On|Off ? $mod_proxy = "ProxyRequests on\n"; $mod_proxy = <<<EOF @@ -33,7 +33,8 @@ function generate_apache_configuration() { </Proxy> EOF; - + + // Setup mod_proxy entries if($config['installedpackages']['apachemodsecurity']) { foreach($config['installedpackages']['apachemodsecurity']['config'] as $ams) { $backend_sites = ""; @@ -47,6 +48,7 @@ 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']; |