Skip to content

Commit b69bf51

Browse files
author
Marius Burkard
committed
- create missing bundle file for apache (thanks to MR !479 by @niklas)
1 parent d0726f0 commit b69bf51

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ function ssl($event_name, $data) {
272272
$key_file2 = $ssl_dir.'/'.$domain.'.key.org';
273273
$csr_file = $ssl_dir.'/'.$domain.'.csr';
274274
$crt_file = $ssl_dir.'/'.$domain.'.crt';
275+
$bundle_file = $ssl_dir.'/'.$domain.'.bundle';
275276

276277
//* Create a SSL Certificate, but only if this is not a mirror server.
277278
if($data['new']['ssl_action'] == 'create' && $conf['mirror_server_id'] == 0) {
@@ -416,7 +417,10 @@ function ssl($event_name, $data) {
416417
if(version_compare($app->system->getapacheversion(true), '2.4.8', '>=')) {
417418
$tmp_data = '';
418419
if(trim($data["new"]["ssl_cert"]) != '') $tmp_data .= $data["new"]["ssl_cert"] . "\n";
419-
if(trim($data["new"]["ssl_bundle"]) != '') $tmp_data .= $data["new"]["ssl_bundle"];
420+
if(trim($data["new"]["ssl_bundle"]) != '') {
421+
$tmp_data .= $data["new"]["ssl_bundle"];
422+
$app->system->file_put_contents($bundle_file, $data["new"]["ssl_bundle"]);
423+
}
420424
if(trim($tmp_data) != '') $app->system->file_put_contents($crt_file, $tmp_data);
421425
} else {
422426
if(trim($data["new"]["ssl_cert"]) != '') $app->system->file_put_contents($crt_file, $data["new"]["ssl_cert"]);

0 commit comments

Comments
 (0)