diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 1eaae6b81ec643ba77fb2024c04be91ecdb9b4c7..41477795591dade4756211e8b06e1000a04e72ea 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -619,6 +619,14 @@ class installer_dist extends installer_base { $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"); diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index b041b78435041e4f0a98daba59de697aabcf803f..d377f7af80006f81928abcc2a4146943420435e1 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -637,6 +637,14 @@ class installer_dist extends installer_base { $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"); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 51050dd2bc1a3162501cdacf62fe073923d00a1a..1d30a59adadcad017e300358b2325e27735bed66 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -832,6 +832,14 @@ class installer_base { $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"); diff --git a/install/tpl/apache_ispconfig.vhost.master b/install/tpl/apache_ispconfig.vhost.master index c86392c8e80a9ae670ed58511b506c8dc977c509..d53dbad3f627ea017b5161a03b13b68d5182bbf7 100644 --- a/install/tpl/apache_ispconfig.vhost.master +++ b/install/tpl/apache_ispconfig.vhost.master @@ -4,7 +4,7 @@ # for the ISPConfig controlpanel ###################################################### -Listen {vhost_port} +{vhost_port_listen} Listen {vhost_port} NameVirtualHost *:{vhost_port}