diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-03-06 19:01:18 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-03-06 19:01:18 -0500 |
commit | 070951ebb3cd401df9e6ed52c827f93b3fb08b7a (patch) | |
tree | 29d704aea538d8893ce9c2e23a528537b99005a7 /config | |
parent | 03912ca67833fbface79426b6d6655310dfc5c57 (diff) | |
download | pfsense-packages-070951ebb3cd401df9e6ed52c827f93b3fb08b7a.tar.gz pfsense-packages-070951ebb3cd401df9e6ed52c827f93b3fb08b7a.tar.bz2 pfsense-packages-070951ebb3cd401df9e6ed52c827f93b3fb08b7a.zip |
Ensure mod_mem_cache exists before attempting use
Diffstat (limited to 'config')
-rw-r--r-- | config/apache_mod_security/apache_mod_security.inc | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc index 64b8befc..58139cc2 100644 --- a/config/apache_mod_security/apache_mod_security.inc +++ b/config/apache_mod_security/apache_mod_security.inc @@ -168,12 +168,14 @@ function generate_apache_configuration() { } // Setup mem_cache - if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['mod_mem_cache']) { - if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['mod_mem_cache_size']) - $mcachesize = $config['installedpackages']['apachemodsecuritysettings']['config'][0]['mod_mem_cache_size']; - else - $mcachesize = "100"; - //$mem_cache = "MCacheSize $mcachesize\n"; + if(file_exists("/usr/local/libexec/apache22/mod_mem_cache.so")) { + if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['mod_mem_cache']) { + if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['mod_mem_cache_size']) + $mcachesize = $config['installedpackages']['apachemodsecuritysettings']['config'][0]['mod_mem_cache_size']; + else + $mcachesize = "100"; + //$mem_cache = "MCacheSize $mcachesize\n"; + } } // CacheRoot Directive @@ -412,6 +414,9 @@ EOF; } +if(file_exists("/usr/local/libexec/apache22/mod_mem_cache.so")) + $mod_mem_cacheLoad = "Module mem_cache_module libexec/apache22/mod_mem_cache.so\n"; + $apache_config = <<<EOF ################################################################################## # NOTE: This file was generated by the pfSense package management system. # @@ -490,7 +495,7 @@ LoadModule auth_digest_module libexec/apache22/mod_auth_digest.so LoadModule file_cache_module libexec/apache22/mod_file_cache.so LoadModule cache_module libexec/apache22/mod_cache.so LoadModule disk_cache_module libexec/apache22/mod_disk_cache.so -LoadModule mem_cache_module libexec/apache22/mod_mem_cache.so +{$mod_mem_cache} LoadModule dumpio_module libexec/apache22/mod_dumpio.so LoadModule include_module libexec/apache22/mod_include.so LoadModule filter_module libexec/apache22/mod_filter.so |