From: Tom Hughes Date: Fri, 22 Jun 2018 08:07:16 +0000 (+0100) Subject: Enable HTTP/2 over TLS on 18.04 X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/3f966bbd9c321ce5377e33b9f920984e2bdcef7b Enable HTTP/2 over TLS on 18.04 --- diff --git a/cookbooks/apache/recipes/default.rb b/cookbooks/apache/recipes/default.rb index 989755f67..bc0410fd3 100644 --- a/cookbooks/apache/recipes/default.rb +++ b/cookbooks/apache/recipes/default.rb @@ -36,6 +36,10 @@ apache_module "mpm_#{node[:apache][:mpm]}" do action [:enable] end +if node[:lsb][:release].to_f >= 18.04 + apache_module "http2" +end + admins = data_bag_item("apache", "admins") apache_conf "httpd" do diff --git a/cookbooks/apache/templates/default/httpd.conf.erb b/cookbooks/apache/templates/default/httpd.conf.erb index add175aa2..ded019d93 100644 --- a/cookbooks/apache/templates/default/httpd.conf.erb +++ b/cookbooks/apache/templates/default/httpd.conf.erb @@ -1,5 +1,10 @@ # DO NOT EDIT - This file is being maintained by Chef +<% if node[:lsb][:release].to_f >= 18.04 -%> +# Enable HTTP/2 over TLS +Protocols h2 http/1.1 + +<% end -%> # Set the number of seconds before receives and sends time out Timeout <%= node[:apache][:timeout] %>