aboutsummaryrefslogtreecommitdiffstats
path: root/config/apache_mod_security-dev
diff options
context:
space:
mode:
authorMarcello Coutinho <marcellocoutinho@gmail.com>2013-11-13 09:53:16 -0800
committerMarcello Coutinho <marcellocoutinho@gmail.com>2013-11-13 09:53:16 -0800
commit1faf9c87569b2637c22be18051f8690c4198a660 (patch)
tree51c4619b496065a68cb2b15caf9e42f4ada7caff /config/apache_mod_security-dev
parentf6dfaf4f9727882055454927da41916f444b9e15 (diff)
parentf5d93c52d18de995a4f1c996a5113041395e3bf3 (diff)
downloadpfsense-packages-1faf9c87569b2637c22be18051f8690c4198a660.tar.gz
pfsense-packages-1faf9c87569b2637c22be18051f8690c4198a660.tar.bz2
pfsense-packages-1faf9c87569b2637c22be18051f8690c4198a660.zip
Merge pull request #548 from djgel/patch-9
Update apache_mod_security.inc
Diffstat (limited to 'config/apache_mod_security-dev')
-rw-r--r--config/apache_mod_security-dev/apache_mod_security.inc36
1 files changed, 19 insertions, 17 deletions
diff --git a/config/apache_mod_security-dev/apache_mod_security.inc b/config/apache_mod_security-dev/apache_mod_security.inc
index c9ab05e8..1cb6afd4 100644
--- a/config/apache_mod_security-dev/apache_mod_security.inc
+++ b/config/apache_mod_security-dev/apache_mod_security.inc
@@ -582,26 +582,28 @@ EOF;
#Check virtualhost locations
foreach ($virtualhost['row'] as $backend){
- $vh_config.=" <Location ".($backend['sitepath'] ? $backend['sitepath'] : "/").">\n";
- $vh_config.=" ProxyPass balancer://{$backend['balancer']}{$backend['backendpath']}\n";
- $vh_config.=" ProxyPassReverse balancer://{$backend['balancer']}{$backend['backendpath']}\n";
- if ($backend['compress']== "no")
- $vh_config.=" SetInputFilter INFLATE\n SetOutputFilter INFLATE\n";
- if ($backend['modsecgroup']!="" && $backend['modsecgroup']!="none" && $mods_settings['enablemodsecurity']=="on"){
- $vh_config.=$mods_group[$backend['modsecgroup']];
- }
- if (is_array($config['installedpackages']['apachemodsecuritymanipulation']) && $mods_settings['enablemodsecurity']=="on"){
- foreach($config['installedpackages']['apachemodsecuritymanipulation']['config'] as $manipulation){
- if ($backend['modsecmanipulation'] == $manipulation['name']){
- if (is_array($manipulation['row']))
- foreach ($manipulation['row'] as $secrule)
- $vh_config.=" {$secrule['type']} {$secrule['value']}\n";
+ if ($backend['balancer'] != "none"){
+ $vh_config.=" <Location ".($backend['sitepath'] ? $backend['sitepath'] : "/").">\n";
+ $vh_config.=" ProxyPass balancer://{$backend['balancer']}{$backend['backendpath']}\n";
+ $vh_config.=" ProxyPassReverse balancer://{$backend['balancer']}{$backend['backendpath']}\n";
+ if ($backend['compress']== "no")
+ $vh_config.=" SetInputFilter INFLATE\n SetOutputFilter INFLATE\n";
+ if ($backend['modsecgroup']!="" && $backend['modsecgroup']!="none" && $mods_settings['enablemodsecurity']=="on"){
+ $vh_config.=$mods_group[$backend['modsecgroup']];
+ }
+ if (is_array($config['installedpackages']['apachemodsecuritymanipulation']) && $mods_settings['enablemodsecurity']=="on"){
+ foreach($config['installedpackages']['apachemodsecuritymanipulation']['config'] as $manipulation){
+ if ($backend['modsecmanipulation'] == $manipulation['name']){
+ if (is_array($manipulation['row']))
+ foreach ($manipulation['row'] as $secrule)
+ $vh_config.=" {$secrule['type']} {$secrule['value']}\n";
+ }
}
}
- }
- $vh_config.= apache_textarea_decode($backend['custom'])."\n\n";
- $vh_config.=" </Location>\n\n";
+ $vh_config.= apache_textarea_decode($backend['custom'])."\n\n";
+ $vh_config.=" </Location>\n\n";
}
+ }
$vh_config.="</VirtualHost>\n";
}
}