2 # Cookbook Name:: apache
5 # Copyright 2011, OpenStreetMap Foundation
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
23 %w(event itk prefork worker).each do |mpm|
24 if mpm == node[:apache][:mpm]
25 apache_module "mpm_#{mpm}" do
29 apache_module "mpm_#{mpm}" do
35 admins = data_bag_item("apache", "admins")
37 apache_conf "httpd" do
38 template "httpd.conf.erb"
39 notifies :reload, "service[apache2]"
42 template "/etc/apache2/ports.conf" do
43 source "ports.conf.erb"
50 action [:enable, :start]
51 supports :status => true, :restart => true, :reload => true
54 apache_module "info" do
56 variables :hosts => admins["hosts"]
59 apache_module "status" do
60 conf "status.conf.erb"
61 variables :hosts => admins["hosts"]
64 apache_module "deflate" do
65 conf "deflate.conf.erb"
68 apache_module "reqtimeout" do
72 munin_plugin "apache_accesses"
73 munin_plugin "apache_processes"
74 munin_plugin "apache_volume"