]> git.openstreetmap.org Git - chef.git/commitdiff
Enable HTTP/2 over TLS on 18.04
authorTom Hughes <tom@compton.nu>
Fri, 22 Jun 2018 08:07:16 +0000 (09:07 +0100)
committerTom Hughes <tom@compton.nu>
Fri, 22 Jun 2018 08:07:16 +0000 (09:07 +0100)
cookbooks/apache/recipes/default.rb
cookbooks/apache/templates/default/httpd.conf.erb

index 989755f67a4e04f333cc542c6b91ee1a08b24dd8..bc0410fd3fb3bb4ef7e5d7e38ee35d44a1bd94a5 100644 (file)
@@ -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
index add175aa29e54df20ce612d426ee50fa22c6e73a..ded019d938923030895ba2794244eb62c743ad0f 100644 (file)
@@ -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] %>