aboutsummaryrefslogtreecommitdiffstats
path: root/config/apache_mod_security
diff options
context:
space:
mode:
Diffstat (limited to 'config/apache_mod_security')
-rw-r--r--config/apache_mod_security/apache_mod_security.inc25
-rw-r--r--config/apache_mod_security/apache_mod_security.xml2
2 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 3b3e8e33..90394d21 100644
--- a/config/apache_mod_security/apache_mod_security.inc
+++ b/config/apache_mod_security/apache_mod_security.inc
@@ -21,19 +21,20 @@ function apache_mod_security_resync() {
function generate_apache_configuration() {
// Generate mod_proxy specific configuration
$mod_proxy = "ProxyRequests on\n";
- foreach($config['installedpackages']['apache_mod_security']['config'] as $ams) {
- $sitename = str_replace(" ", "", $ams['sitename']);
- $mod_proxy .= "ProxyPass /{$sitename}/ {$sitename} \n";
- $mod_proxy .= "ProxyHTMLURLMap {$ams['siteurl']} /{$sitename} \n";
- $mod_proxy .= "<Location /{$sitename}/>\n";
- $mod_proxy .= " ProxyPassReverse /\n";
- $mod_proxy .= " SetOutputFilter proxy-html\n";
- $mod_proxy .= " ProxyHTMLURLMap / /{$sitename}/\n";
- $mod_proxy .= " ProxyHTMLURLMap /{$ams['sitename']} /{$sitename}\n";
- $mod_proxy .= " RequestHeader unset Accept-Encoding\n";
- $mod_proxy .= "</Location>\n";
+ if($config['installedpackages']['apache_mod_security']) {
+ foreach($config['installedpackages']['apache_mod_security']['config'] as $ams) {
+ $sitename = str_replace(" ", "", $ams['sitename']);
+ $mod_proxy .= "ProxyPass /{$sitename}/ {$sitename} \n";
+ $mod_proxy .= "ProxyHTMLURLMap {$ams['siteurl']} /{$sitename} \n";
+ $mod_proxy .= "<Location /{$sitename}/>\n";
+ $mod_proxy .= " ProxyPassReverse /\n";
+ $mod_proxy .= " SetOutputFilter proxy-html\n";
+ $mod_proxy .= " ProxyHTMLURLMap / /{$sitename}/\n";
+ $mod_proxy .= " ProxyHTMLURLMap /{$ams['sitename']} /{$sitename}\n";
+ $mod_proxy .= " RequestHeader unset Accept-Encoding\n";
+ $mod_proxy .= "</Location>\n";
+ }
}
-
// 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'];
diff --git a/config/apache_mod_security/apache_mod_security.xml b/config/apache_mod_security/apache_mod_security.xml
index 589f0ef3..e28ccac1 100644
--- a/config/apache_mod_security/apache_mod_security.xml
+++ b/config/apache_mod_security/apache_mod_security.xml
@@ -41,7 +41,6 @@
<name>apache_mod_security</name>
<version>1.0</version>
<title>Services: Mod_Security+Apache+Proxy</title>
- <include_file>/usr/local/pkg/apache_mod_security.inc</include_file>
<menu>
<name>apache_mod_security</name>
<tooltiptext></tooltiptext>
@@ -106,4 +105,5 @@
</custom_php_deinstall_command>
<custom_php_after_form_command>
</custom_php_after_form_command>
+ <include_file>/usr/local/pkg/apache_mod_security.inc</include_file>
</packagegui> \ No newline at end of file