From 1af4dfa9997c6921e75c92720113d17489757d92 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 21 Jun 2009 21:25:29 -0400 Subject: Set ServerName --- config/apache_mod_security/apache_mod_security.inc | 8 +++++++- config/apache_mod_security/apache_mod_security_settings.xml | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc index 038ae4ae..6406066d 100644 --- a/config/apache_mod_security/apache_mod_security.inc +++ b/config/apache_mod_security/apache_mod_security.inc @@ -55,6 +55,12 @@ EOF; log_error("WARNING! Global site Administrator E-Mail address has not been set. Defaulting to bogus e-mail address."); } + // Set ServerName + if($config['installedpackages']['apache_mod_security_settings']['config']['hostnmae']) { + $servername = "ServerName {$config['installedpackages']['apache_mod_security_settings']['config']['hostnmae']}\n"; + else + $servername = `hostname`; + // Set global site namne if($config['installedpackages']['apache_mod_security_settings']['config']['globalbindtoipaddr']) { $global_listen = "Listen " . $config['installedpackages']['apache_mod_security_settings']['config']['globalbindtoipaddr']; @@ -263,7 +269,7 @@ ServerAdmin {$global_site_email} # # If your host doesn't have a registered DNS name, enter its IP address here. # -#ServerName {$globalsiteurl}:80 +{$servername} # # DocumentRoot: The directory out of which you will serve your diff --git a/config/apache_mod_security/apache_mod_security_settings.xml b/config/apache_mod_security/apache_mod_security_settings.xml index 00dbf723..866004d3 100644 --- a/config/apache_mod_security/apache_mod_security_settings.xml +++ b/config/apache_mod_security/apache_mod_security_settings.xml @@ -68,11 +68,11 @@ input - Global site URL (FQDN) - globalsiteurl + Server hostnmae + hostnmae NOTE: Leave blank to use this devices hostname. ]]> -- cgit v1.2.3