diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 95be196417fd2a0e47aa9c9b9decdfd5b08af8e1..9ac5c788f0f7169527c6b096e757a40738e607b8 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2553,7 +2553,7 @@ class installer_base {
 			}
 
 			// comment out the listen directive if port is 80 or 443
-			if($conf['web']['apps_vhost_ip'] == 80 or $conf['web']['apps_vhost_ip'] == 443) {
+			if($conf['web']['apps_vhost_port'] == 80 or $conf['web']['apps_vhost_port'] == 443) {
 				$tpl->setVar('vhost_port_listen','#');
 			} else {
 				$tpl->setVar('vhost_port_listen','');