From 083dc05208f31f5c0b60f902e59dd240be4c5daa Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 18 Apr 2011 13:12:24 +0000
Subject: [PATCH] Fixed: FS#1596 - No such file or directory in
 [...]/apache2_plugin.inc.php on line 841

---
 server/plugins-available/apache2_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index de6a04360..5011d5fa5 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -866,7 +866,7 @@ class apache2_plugin {
 
 		$vhost_file = escapeshellcmd($web_config['vhost_conf_dir'].'/'.$data['new']['domain'].'.vhost');
 		//* Make a backup copy of vhost file
-		copy($vhost_file,$vhost_file.'~');
+		if(file_exists($vhost_file)) copy($vhost_file,$vhost_file.'~');
 		
 		//* Write vhost file
 		file_put_contents($vhost_file,$tpl->grab());
-- 
GitLab