aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-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";
}
}