From cb7a5d289dfc5346b00aad95e705b98bd537b84d Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 21 Jun 2009 20:19:59 -0400 Subject: Fix listen port and ensure apache directory exists --- config/apache_mod_security/apache_mod_security.inc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'config/apache_mod_security') diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc index a886b7e4..aec767a8 100644 --- a/config/apache_mod_security/apache_mod_security.inc +++ b/config/apache_mod_security/apache_mod_security.inc @@ -2,11 +2,13 @@ // Syntax:ProxyPreserveHost On|Off +global $config, $g; +conf_mount_rw(); +if(!is_dir("/usr/local/apachemodsecurity")) + safe_mkdir("/usr/local/apachemodsecurity"); + function apache_mod_security_install() { - global $config, $g; - conf_mount_rw(); - if(!is_dir("/usr/local/apachemodsecurity")) - safe_mkdir("/usr/local/apachemodsecurity"); + } function apache_mod_security_deinstall() { @@ -59,6 +61,10 @@ function generate_apache_configuration() { $global_listen .= ":80"; } else { $global_listen = "Listen {$config['system']['hostname']}.{$config['system']['domain']}"; + if($config['installedpackages']['apache_mod_security_settings']['config']['globalbindtoport']) + $global_listen .= ":" . $config['installedpackages']['apache_mod_security_settings']['config']['globalbindtoport']; + else + $global_listen .= ":80"; } $apache_config = <<