diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 103be06b3f12a12319fd989d6db9b0902a80217f..9faa2b1c7b02aea8e471343fbba02e31074ffc14 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 26a7f2bd45e9b44770444bad04c499bf92338e19..536297d21559a776f6dc8839610d07fb8acafce9 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!