]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/apache/recipes/default.rb
Enable mod_headers everywhere as we use it for HSTS support
[chef.git] / cookbooks / apache / recipes / default.rb
index 9b6c6ef5401bb2e8938b1202717b07a999b5b9ea..559fc83b0a7ff7eaaa57cad36ea8b3c4f706a4e6 100644 (file)
 
 include_recipe "ssl"
 
-package "apache2"
-package "libwww-perl"
+package %w[
+  apache2
+  libwww-perl
+]
 
 %w[event itk prefork worker].each do |mpm|
   if mpm == node[:apache][:mpm]
@@ -67,10 +69,17 @@ apache_module "deflate" do
   conf "deflate.conf.erb"
 end
 
-apache_module "reqtimeout" do
-  action [:disable]
+if node[:apache][:reqtimeout]
+  apache_module "reqtimeout" do
+    action [:enable]
+  end
+else
+  apache_module "reqtimeout" do
+    action [:disable]
+  end
 end
 
+apache_module "headers"
 apache_module "ssl"
 
 apache_conf "ssl" do