From 5cfd5d349cdf00af6ed8e8cd517e104122f98026 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Mon, 30 Jan 2017 10:50:00 +0100
Subject: [PATCH] Bugfix for wrong Letsencrypt symlinks in relative symlink
 mode.

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

diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 1fecdfdda7..3017638eed 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -3421,6 +3421,7 @@ class apache2_plugin {
 
 		// Add ($cnt_to-1) number of "../" elements to left side of $cfrom
 		for ($c = 0; $c < (count($a2)-1); $c++) { $cfrom = '../'.$cfrom; }
+		if(strstr($to,'/etc/letsencrypt/archive/')) $to = str_replace('/etc/letsencrypt/archive/','/etc/letsencrypt/live/',$to);
 
 		return symlink($cfrom, $to);
 	}
-- 
GitLab