projects
/
chef.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6ccd015
)
In Apache 2.4 disable all other MPMs except required
author
Grant Slater
<git@firefishy.com>
Tue, 15 Jul 2014 08:00:33 +0000
(09:00 +0100)
committer
Grant Slater
<git@firefishy.com>
Tue, 15 Jul 2014 08:01:46 +0000
(09:01 +0100)
cookbooks/apache/recipes/default.rb
patch
|
blob
|
history
diff --git
a/cookbooks/apache/recipes/default.rb
b/cookbooks/apache/recipes/default.rb
index 4fa9b3bc38655f87ebd403992f70d5f078992715..ebf404945f165b2e9e8408dbe880e6ac5e6aed33 100644
(file)
--- a/
cookbooks/apache/recipes/default.rb
+++ b/
cookbooks/apache/recipes/default.rb
@@
-20,6
+20,17
@@
package "apache2"
package "apache2-mpm-#{node[:apache][:mpm]}"
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
admins = data_bag_item("apache", "admins")
template "/etc/apache2/httpd.conf" do