diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index 1063151d8bfb3b71b02d96d6f2651eed4a94b8ad..afe3aa071417b7bc66d403e03a66d4dcca09e29f 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -426,7 +426,18 @@ class installer_dist extends installer_base {
         $vhost_conf_dir = $conf['apache']['vhost_conf_dir'];
         $vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
         
-		copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
+		// copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
+		$content = rf("tpl/apache_ispconfig.conf.master");
+		$records = $this->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ".$conf["server_id"]." AND virtualhost = 'y'");
+		if(count($records) > 0) {
+			foreach($records as $rec) {
+				$content .= "NameVirtualHost ".$rec["ip_address"].":80\n";
+				$content .= "NameVirtualHost ".$rec["ip_address"].":443\n";
+			}
+		}
+		$content .= "\n";
+		wf($vhost_conf_dir.'/ispconfig.conf',$content);
+		
 		if(!@is_link($vhost_conf_enabled_dir."/000-ispconfig.conf")) {
 			exec("ln -s ".$vhost_conf_dir."/ispconfig.conf ".$vhost_conf_enabled_dir."/000-ispconfig.conf");
 		}
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 370353244630930068d2b8081416076c2aaa7f28..51502359f3d2845647177d3142aa306b04a035d9 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -448,7 +448,18 @@ class installer_dist extends installer_base {
         $vhost_conf_dir = $conf['apache']['vhost_conf_dir'];
         $vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
         
-		copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
+		//copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
+		$content = rf("tpl/apache_ispconfig.conf.master");
+		$records = $this->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ".$conf["server_id"]." AND virtualhost = 'y'");
+		if(count($records) > 0) {
+			foreach($records as $rec) {
+				$content .= "NameVirtualHost ".$rec["ip_address"].":80\n";
+				$content .= "NameVirtualHost ".$rec["ip_address"].":443\n";
+			}
+		}
+		$content .= "\n";
+		wf($vhost_conf_dir.'/ispconfig.conf',$content);
+		
 		if(!@is_link($vhost_conf_enabled_dir."/000-ispconfig.conf")) {
 			exec("ln -s ".$vhost_conf_dir."/ispconfig.conf ".$vhost_conf_enabled_dir."/000-ispconfig.conf");
 		}
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index a22ab50747748708683e3fb0b0cb6ffa86e3ec52..1372c8c296200f6500b038e427b4d1752cfc6838 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -723,7 +723,19 @@ class installer_base {
         $vhost_conf_dir = $conf['apache']['vhost_conf_dir'];
         $vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
         
-		copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
+		// copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
+		
+		$content = rf("tpl/apache_ispconfig.conf.master");
+		$records = $this->db->queryAllRecords("SELECT * FROM server_ip WHERE server_id = ".$conf["server_id"]." AND virtualhost = 'y'");
+		if(count($records) > 0) {
+			foreach($records as $rec) {
+				$content .= "NameVirtualHost ".$rec["ip_address"].":80\n";
+				$content .= "NameVirtualHost ".$rec["ip_address"].":443\n";
+			}
+		}
+		$content .= "\n";
+		wf($vhost_conf_dir.'/ispconfig.conf',$content);
+		
 		if(!@is_link($vhost_conf_enabled_dir."/000-ispconfig.conf")) {
 			exec("ln -s ".$vhost_conf_dir."/ispconfig.conf ".$vhost_conf_enabled_dir."/000-ispconfig.conf");
 		}