aboutsummaryrefslogtreecommitdiffstats
path: root/config/apache_mod_security
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-21 21:25:29 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-21 21:25:29 -0400
commit1af4dfa9997c6921e75c92720113d17489757d92 (patch)
treec928d83ef30655b70559145e3287b1284f424b3e /config/apache_mod_security
parentbf6039d9c060056a1df3ad4975b35fcbd1e6f221 (diff)
downloadpfsense-packages-1af4dfa9997c6921e75c92720113d17489757d92.tar.gz
pfsense-packages-1af4dfa9997c6921e75c92720113d17489757d92.tar.bz2
pfsense-packages-1af4dfa9997c6921e75c92720113d17489757d92.zip
Set ServerName
Diffstat (limited to 'config/apache_mod_security')
-rw-r--r--config/apache_mod_security/apache_mod_security.inc8
-rw-r--r--config/apache_mod_security/apache_mod_security_settings.xml6
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 @@
<type>input</type>
</field>
<field>
- <fielddescr>Global site URL (FQDN)</fielddescr>
- <fieldname>globalsiteurl</fieldname>
+ <fielddescr>Server hostnmae</fielddescr>
+ <fieldname>hostnmae</fieldname>
<description>
<![CDATA[
- Enter the site global site URL.
+ Enter the servers hostname
<br/>
NOTE: Leave blank to use this devices hostname.
]]>