Skip to content

Commit 61c92e6

Browse files
author
Till Brehm
committed
Fixed #4667 Websites UI / Let's Encrypt :: add Option to allow switching to fullchain.pem in favor of chain.pem
1 parent 024c778 commit 61c92e6

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1250,12 +1250,20 @@ function update($event_name, $data) {
12501250
// useless data
12511251
unset($subdomains);
12521252
unset($temp_domains);
1253-
1254-
$crt_tmp_file = "/etc/letsencrypt/live/".$domain."/cert.pem";
1253+
1254+
if(version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) {
1255+
$crt_tmp_file = "/etc/letsencrypt/live/".$domain."/fullchain.pem";
1256+
} else {
1257+
$crt_tmp_file = "/etc/letsencrypt/live/".$domain."/cert.pem";
1258+
}
12551259
$key_tmp_file = "/etc/letsencrypt/live/".$domain."/privkey.pem";
12561260
$bundle_tmp_file = "/etc/letsencrypt/live/".$domain."/chain.pem";
12571261
if(!is_dir("/etc/letsencrypt/live/".$domain)) {
1258-
$crt_tmp_file = "/etc/letsencrypt/live/www.".$domain."/fullchain.pem";
1262+
if(version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) {
1263+
$crt_tmp_file = "/etc/letsencrypt/live/www.".$domain."/fullchain.pem";
1264+
} else {
1265+
$crt_tmp_file = "/etc/letsencrypt/live/www.".$domain."/cert.pem";
1266+
}
12591267
$key_tmp_file = "/etc/letsencrypt/live/www.".$domain."/privkey.pem";
12601268
$bundle_tmp_file = "/etc/letsencrypt/live/www.".$domain."/chain.pem";
12611269
}

0 commit comments

Comments
 (0)