add http2 support for froxlor-vhost and per-domain
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -434,6 +434,9 @@ class apache extends HttpConfigBase
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' SSLEngine On' . "\n";
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' SSLProtocol -ALL +TLSv1 +TLSv1.2' . "\n";
|
||||
if (Settings::Get('system.apache24') == '1') {
|
||||
if (Settings::Get('system.http2_support') == '1') {
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' Protocols h2 http/1.1' . "\n";
|
||||
}
|
||||
$this->virtualhosts_data[$vhosts_filename] .= ' SSLCompression Off' . "\n";
|
||||
}
|
||||
// this makes it more secure, thx to Marcel (08/2013)
|
||||
@@ -869,6 +872,9 @@ class apache extends HttpConfigBase
|
||||
$vhost_content .= ' SSLEngine On' . "\n";
|
||||
$vhost_content .= ' SSLProtocol -ALL +TLSv1 +TLSv1.2' . "\n";
|
||||
if (Settings::Get('system.apache24') == '1') {
|
||||
if (isset($domain['http2']) && $domain['http2'] == '1') {
|
||||
$vhost_content .= ' Protocols h2 http/1.1' . "\n";
|
||||
}
|
||||
$vhost_content .= ' SSLCompression Off' . "\n";
|
||||
}
|
||||
// this makes it more secure, thx to Marcel (08/2013)
|
||||
|
||||
@@ -196,7 +196,7 @@ class nginx extends HttpConfigBase
|
||||
}
|
||||
}
|
||||
|
||||
$http2 = $ssl_vhost == true && Settings::Get('system.nginx_http2_support') == '1';
|
||||
$http2 = $ssl_vhost == true && Settings::Get('system.http2_support') == '1';
|
||||
|
||||
/**
|
||||
* this HAS to be set for the default host in nginx or else no vhost will work
|
||||
@@ -418,7 +418,7 @@ class nginx extends HttpConfigBase
|
||||
$_vhost_content .= $this->processSpecialConfigTemplate($ipandport['default_vhostconf_domain'], $domain, $domain['ip'], $domain['port'], $ssl_vhost) . "\n";
|
||||
}
|
||||
|
||||
$http2 = $ssl_vhost == true && Settings::Get('system.nginx_http2_support') == '1';
|
||||
$http2 = $ssl_vhost == true && (isset($domain['http2']) && $domain['http2'] == '1');
|
||||
|
||||
$vhost_content .= "\t" . 'listen ' . $ipport . ($ssl_vhost == true ? ' ssl' : '') . ($http2 == true ? ' http2' : '') . ';' . "\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user