From f6d7456d0d6a190053b8b286553321d6264311b8 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 19 Nov 2008 06:33:30 -0500
Subject: [PATCH] Comment out the listen directive in the ispconfig.vhost file if the port for ispconfig is 80 or 443.
---
install/lib/installer_base.lib.php | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 51050dd..1d30a59 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -832,6 +832,14 @@
$content = rf("tpl/apache_ispconfig.vhost.master");
$content = str_replace('{vhost_port}', $conf['apache']['vhost_port'], $content);
+
+ // comment out the listen directive if port is 80 or 443
+ if($conf['apache']['vhost_port'] == 80 or $conf['apache']['vhost_port'] == 443) {
+ $content = str_replace('{vhost_port_listen}', '#', $content);
+ } else {
+ $content = str_replace('{vhost_port_listen}', '', $content);
+ }
+
wf("$vhost_conf_dir/ispconfig.vhost", $content);
//copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
--
Gitblit v1.9.1