aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-06-23 21:52:32 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-06-23 21:52:32 -0400
commitc9c672d2190acc14527d0400f1f21e27dbd16889 (patch)
tree4eff295b269671ae907e6459c96bbb4ec516e8f3 /config
parente255e42ffafd6ff4b862889e535cf0097b5f19ac (diff)
downloadpfsense-packages-c9c672d2190acc14527d0400f1f21e27dbd16889.tar.gz
pfsense-packages-c9c672d2190acc14527d0400f1f21e27dbd16889.tar.bz2
pfsense-packages-c9c672d2190acc14527d0400f1f21e27dbd16889.zip
Fix ServerName when hostname is not defined
Diffstat (limited to 'config')
-rw-r--r--config/apache_mod_security/apache_mod_security.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/config/apache_mod_security/apache_mod_security.inc b/config/apache_mod_security/apache_mod_security.inc
index 55ec4616..617e2126 100644
--- a/config/apache_mod_security/apache_mod_security.inc
+++ b/config/apache_mod_security/apache_mod_security.inc
@@ -54,7 +54,7 @@ function apache_mod_security_install() {
$filename = "apache_mod_security.sh";
- $start = "php -q -d auto_prepend_file=config.inc <<ENDPHP
+ $start = "/usr/local/bin/php -q -d auto_prepend_file=config.inc <<ENDPHP
<?php
require_once(\"functions.inc\");
require_once(\"/usr/local/pkg/apache_mod_security.inc\");
@@ -62,7 +62,7 @@ function apache_mod_security_install() {
?>
ENDPHP\n";
- $stop = "php -q -d auto_prepend_file=config.inc <<ENDPHP
+ $stop = "/usr/local/bin/php -q -d auto_prepend_file=config.inc <<ENDPHP
<?php
require_once(\"functions.inc\");
require_once(\"/usr/local/pkg/apache_mod_security.inc\");
@@ -76,9 +76,9 @@ function apache_mod_security_install() {
"stop" => $stop
)
);
-
}
+// Deinstall package routines
function apache_mod_security_deinstall() {
global $config, $g;
exec("/bin/rm -rf /usr/local/apachemodsecurity");
@@ -109,9 +109,9 @@ function generate_apache_configuration() {
if($config['installedpackages']['apachemodsecuritysettings']['config']['hostname']) {
$servername = "ServerName {$config['installedpackages']['apachemodsecuritysettings']['config'][0]['hostname']}\n";
} else {
- $servername = `ServerName hostname`;
+ $servername = "ServerName " . `hostname` . "\n";
}
-
+
// Set global listening directive
if($config['installedpackages']['apachemodsecuritysettings']['config'][0]['globalbindtoipaddr']) {
$global_listen = $config['installedpackages']['apachemodsecuritysettings']['config'][0]['globalbindtoipaddr'];
@@ -190,7 +190,7 @@ EOF;
// Set rowhelper used variables
foreach($ams['row'] as $row)
$additionalsitehostnames .= "{$row['additionalsitehostnames']} ";
- $backend_sites = "";
+ $backend_sites = ""; // not technically needed. added for readability due to .='s
foreach($ams['row'] as $row) {
$backend_sites .= "{$row['webserveripaddr']}";
if(substr($row['webserveripaddr'],count($row['webserveripaddr']),1) != "/")