Skip to content

Commit 38b5377

Browse files
author
florian030
committed
add HTTP/2 for apache
1 parent a6df2bb commit 38b5377

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

server/conf/vhost.conf.master

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,15 @@
3737
</tmpl_if>
3838
ServerAdmin webmaster@<tmpl_var name='domain'>
3939

40+
<tmpl_if name='ssl_enabled'>
41+
<tmpl_if name='enable_http2' op='==' value='y'>
42+
Protocols h2 http/1.1
43+
SSLProtocol All -SSLv2 -SSLv3
44+
SSLCipherSuite 'EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !RC4 !aNULL !eNULL !LOW !3DES !M
45+
D5 !EXP !PSK !SRP !DSS'
46+
</tmpl_if>
47+
</tmpl_if>
48+
4049
ErrorLog /var/log/ispconfig/httpd/<tmpl_var name='domain'>/error.log
4150

4251
<tmpl_if name='errordocs'>

server/plugins-available/apache2_plugin.inc.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,6 +1214,17 @@ function update($event_name, $data) {
12141214

12151215
if(@is_file($bundle_file)) $vhost_data['has_bundle_cert'] = 1;
12161216

1217+
// HTTP/2.0 ?
1218+
$vhost_data['enable_http2'] = 'n';
1219+
if($vhost_data['enable_spdy'] == 'y'){
1220+
// check if apache supports http_v2
1221+
exec("2>&1 apachectl -M | grep http2_module", $tmp_output, $tmp_retval);
1222+
if($tmp_retval == 0){
1223+
$vhost_data['enable_http2'] = 'y';
1224+
}
1225+
unset($tmp_output, $tmp_retval);
1226+
}
1227+
12171228
// Set SEO Redirect
12181229
if($data['new']['seo_redirect'] != ''){
12191230
$vhost_data['seo_redirect_enabled'] = 1;

0 commit comments

Comments
 (0)