From 29312d8acdaae23bf07bcb5fc0627ffc2d53e4e6 Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Tue, 15 Jul 2014 09:00:33 +0100 Subject: [PATCH 1/1] In Apache 2.4 disable all other MPMs except required --- cookbooks/apache/recipes/default.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/cookbooks/apache/recipes/default.rb b/cookbooks/apache/recipes/default.rb index 4fa9b3bc3..ebf404945 100644 --- a/cookbooks/apache/recipes/default.rb +++ b/cookbooks/apache/recipes/default.rb @@ -20,6 +20,17 @@ package "apache2" package "apache2-mpm-#{node[:apache][:mpm]}" +#In Apache 2.4 mpm have become runtime loadable modules +#Diable all mpm except the required mpm +if node[:lsb][:release].to_f >= 14.04 + mpms = ['event', 'itk', 'prefork', 'worker'] + mpms.reject{|u| u == node[:apache][:mpm]}.each do |mpm| + apache_module mpm do + action [ :disable ] + end + end +end + admins = data_bag_item("apache", "admins") template "/etc/apache2/httpd.conf" do -- 2.39.5