Skip to content

Commit c31703b

Browse files
author
Till Brehm
committed
Implements #5007 Remove SSL bundle files if present on an apache 2.4 server
1 parent b7ee5f0 commit c31703b

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

server/conf/vhost.conf.master

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@
7575
# </IfModule>
7676
SSLCertificateFile <tmpl_var name='ssl_crt_file'>
7777
SSLCertificateKeyFile <tmpl_var name='ssl_key_file'>
78-
<tmpl_if name='has_bundle_cert'>
79-
<tmpl_if name='apache_version' op='<' value='2.4.8' format='version'>
80-
SSLCertificateChainFile <tmpl_var name='ssl_bundle_file'>
81-
</tmpl_if>
8278
<tmpl_if name='apache_version' op='>=' value='2.4' format='version'>
8379
SSLUseStapling on
8480
SSLStaplingResponderTimeout 5
8581
SSLStaplingReturnResponderErrors off
8682
</tmpl_if>
83+
<tmpl_if name='has_bundle_cert'>
84+
<tmpl_if name='apache_version' op='<' value='2.4.8' format='version'>
85+
SSLCertificateChainFile <tmpl_var name='ssl_bundle_file'>
86+
</tmpl_if>
8787
</tmpl_if>
8888
</tmpl_if>
8989
</IfModule>

server/plugins-available/apache2_plugin.inc.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,8 +1223,9 @@ function update($event_name, $data) {
12231223
$app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ? AND `server_id` = ?", $data['new']['ssl'], 'n', $data['new']['domain'], $conf['server_id']);
12241224
}
12251225
}
1226-
1227-
if(@is_file($bundle_file)) $vhost_data['has_bundle_cert'] = 1;
1226+
1227+
// Use separate bundle file only for apache versions < 2.4.8
1228+
if(@is_file($bundle_file) && version_compare($app->system->getapacheversion(true), '2.4.8', '<')) $vhost_data['has_bundle_cert'] = 1;
12281229

12291230
// HTTP/2.0 ?
12301231
$vhost_data['enable_http2'] = 'n';

0 commit comments

Comments
 (0)