From f90e18f6826392c02031fe458df70d22528926c4 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Sun, 23 Oct 2016 13:31:01 +0200
Subject: [PATCH] - changed vhost config to reflect ssl changes

---
 server/conf/vhost.conf.master                   | 6 +++---
 server/plugins-available/apache2_plugin.inc.php | 4 ++++
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master
index 103be06b3f..9faa2b1c7b 100644
--- a/server/conf/vhost.conf.master
+++ b/server/conf/vhost.conf.master
@@ -60,11 +60,11 @@
 		# <IfModule mod_headers.c>
 		# Header always add Strict-Transport-Security "max-age=15768000"
 		# </IfModule>
-		SSLCertificateFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.crt
-		SSLCertificateKeyFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.key
+		SSLCertificateFile <tmpl_var name='ssl_crt_file'>
+		SSLCertificateKeyFile <tmpl_var name='ssl_key_file'>
 <tmpl_if name='has_bundle_cert'>
 		<tmpl_if name='apache_version' op='<' value='2.4.8' format='version'>
-		SSLCertificateChainFile <tmpl_var name='document_root'>/ssl/<tmpl_var name='ssl_domain'>.bundle
+		SSLCertificateChainFile <tmpl_var name='ssl_bundle_file'>
 		</tmpl_if>
 		<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
 		SSLUseStapling on
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 26a7f2bd45..536297d215 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1153,6 +1153,10 @@ class apache2_plugin {
 		$crt_file = $ssl_dir.'/'.$domain.'.crt';
 		$bundle_file = $ssl_dir.'/'.$domain.'.bundle';
 
+		$vhost_data['ssl_crt_file'] = $crt_file;
+		$vhost_data['ssl_key_file'] = $key_file;
+		$vhost_data['ssl_bundle_file'] = $bundle_file;
+
 		if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y') {
 			if(substr($domain, 0, 2) === '*.') {
 				// wildcard domain not yet supported by letsencrypt!
-- 
GitLab