From 2ba5674549c73bea49066d5cf9684489a637214c Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Wed, 24 Jun 2009 15:37:57 -0400 Subject: Check config with httpd -t --- config/apache_mod_security/apache_mod_security.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'config/apache_mod_security/apache_mod_security.inc') diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc index 536f2f03..777c5801 100644 --- a/config/apache_mod_security/apache_mod_security.inc +++ b/config/apache_mod_security/apache_mod_security.inc @@ -93,9 +93,19 @@ function apache_mod_security_deinstall() { function apache_mod_security_resync() { global $config, $g; generate_apache_configuration(); + apache_mod_security_checkconfig(); apache_mod_security_restart(); } +function apache_mod_security_checkconfig() { + global $config, $g; + $status = `https -t`; + if(!strstr($status, "OK")) { + $input_error = "apache_mod_security_package: There was an error parsing the Apache configuration: {$status}"; + log_error("apache_mod_security_package: There was an error parsing the Apache configuration: {$status}";); + } +} + // Generate mod_proxy specific configuration function generate_apache_configuration() { global $config, $g; -- cgit v1.2.3