Vendor the external cookbooks

Knife-Zero doesn't include Berkshelf support, so vendoring everything in
the repo is convenient again
This commit is contained in:
Greg Karékinian
2019-10-13 19:17:42 +02:00
parent f4bfe31ac1
commit a32f34b408
1245 changed files with 100630 additions and 0 deletions

View File

@@ -0,0 +1,219 @@
#
# Cookbook:: apache2
# Recipe:: default
#
# Copyright:: 2008-2013, Chef Software, Inc.
# Copyright:: 2014-2015, Alexander van Zoest
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package 'apache2' do # ~FC009 only available in apt_package. See #388
package_name node['apache']['package']
default_release node['apache']['default_release'] unless node['apache']['default_release'].nil?
end
%w(sites-available sites-enabled mods-available mods-enabled conf-available conf-enabled).each do |dir|
directory "#{node['apache']['dir']}/#{dir}" do
mode '0755'
owner 'root'
group node['apache']['root_group']
end
end
%w(default default.conf 000-default 000-default.conf).each do |site|
link "#{node['apache']['dir']}/sites-enabled/#{site}" do
action :delete
not_if { site == "#{node['apache']['default_site_name']}.conf" && node['apache']['default_site_enabled'] }
end
file "#{node['apache']['dir']}/sites-available/#{site}" do
action :delete
backup false
not_if { site == "#{node['apache']['default_site_name']}.conf" && node['apache']['default_site_enabled'] }
end
end
directory node['apache']['log_dir'] do
mode '0755'
recursive true
end
# perl is needed for the a2* scripts
package node['apache']['perl_pkg']
package 'perl-Getopt-Long-Descriptive' if platform?('fedora')
%w(a2ensite a2dissite a2enmod a2dismod a2enconf a2disconf).each do |modscript|
link "/usr/sbin/#{modscript}" do
action :delete
only_if { ::File.symlink?("/usr/sbin/#{modscript}") }
end
template "/usr/sbin/#{modscript}" do
source "#{modscript}.erb"
mode '0700'
owner 'root'
group node['apache']['root_group']
action :create
end
end
unless platform_family?('debian')
cookbook_file '/usr/local/bin/apache2_module_conf_generate.pl' do
source 'apache2_module_conf_generate.pl'
mode '0755'
owner 'root'
group node['apache']['root_group']
end
execute 'generate-module-list' do
command "/usr/local/bin/apache2_module_conf_generate.pl #{node['apache']['lib_dir']} #{node['apache']['dir']}/mods-available"
action :nothing
end
end
if platform_family?('freebsd')
directory "#{node['apache']['dir']}/Includes" do
action :delete
recursive true
end
directory "#{node['apache']['dir']}/extra" do
action :delete
recursive true
end
end
if platform_family?('suse')
directory "#{node['apache']['dir']}/vhosts.d" do
action :delete
recursive true
end
%w(charset.conv default-vhost.conf default-server.conf default-vhost-ssl.conf errors.conf listen.conf mime.types mod_autoindex-defaults.conf mod_info.conf mod_log_config.conf mod_status.conf mod_userdir.conf mod_usertrack.conf uid.conf).each do |file|
file "#{node['apache']['dir']}/#{file}" do
action :delete
backup false
end
end
end
%W(
#{node['apache']['dir']}/ssl
#{node['apache']['cache_dir']}
).each do |path|
directory path do
mode '0755'
owner 'root'
group node['apache']['root_group']
end
end
directory node['apache']['lock_dir'] do
mode '0755'
if node['platform_family'] == 'debian'
owner node['apache']['user']
else
owner 'root'
end
group node['apache']['root_group']
end
# Set the preferred execution binary - prefork or worker
template "/etc/sysconfig/#{node['apache']['package']}" do
source 'etc-sysconfig-httpd.erb'
owner 'root'
group node['apache']['root_group']
mode '0644'
notifies :restart, 'service[apache2]', :delayed
only_if { platform_family?('rhel', 'amazon', 'fedora', 'suse') }
end
template "#{node['apache']['dir']}/envvars" do
source 'envvars.erb'
owner 'root'
group node['apache']['root_group']
mode '0644'
notifies :reload, 'service[apache2]', :delayed
only_if { platform_family?('debian') }
end
template 'apache2.conf' do
if platform_family?('rhel', 'amazon', 'fedora', 'arch', 'freebsd')
path "#{node['apache']['conf_dir']}/httpd.conf"
elsif platform_family?('debian')
path "#{node['apache']['conf_dir']}/apache2.conf"
elsif platform_family?('suse')
path "#{node['apache']['conf_dir']}/httpd.conf"
end
action :create
source 'apache2.conf.erb'
owner 'root'
group node['apache']['root_group']
mode '0644'
notifies :reload, 'service[apache2]', :delayed
end
%w(security charset).each do |conf|
apache_conf conf do
enable true
end
end
apache_conf 'ports' do
enable false
conf_path node['apache']['dir']
end
if node['apache']['version'] == '2.4'
if node['apache']['mpm_support'].include?(node['apache']['mpm'])
include_recipe "apache2::mpm_#{node['apache']['mpm']}"
else
Chef::Log.warn("apache2: #{node['apache']['mpm']} module is not supported and must be handled separately!")
end
end
node['apache']['default_modules'].each do |mod|
module_recipe_name = mod =~ /^mod_/ ? mod : "mod_#{mod}"
include_recipe "apache2::#{module_recipe_name}"
end
if node['apache']['default_site_enabled']
web_app node['apache']['default_site_name'] do
template 'default-site.conf.erb'
enable node['apache']['default_site_enabled']
end
end
apache_service_name = node['apache']['service_name']
service 'apache2' do
service_name apache_service_name
case node['platform_family']
when 'rhel'
if node['platform_version'].to_f < 7.0 && node['apache']['version'] != '2.4'
restart_command "/sbin/service #{apache_service_name} restart && sleep 1"
reload_command "/sbin/service #{apache_service_name} graceful && sleep 1"
end
when 'debian'
provider Chef::Provider::Service::Debian
when 'arch'
service_name apache_service_name
end
supports [:start, :restart, :reload, :status]
action [:enable, :start]
only_if "#{node['apache']['binary']} -t", environment: { 'APACHE_LOG_DIR' => node['apache']['log_dir'] }, timeout: 10
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_access_compat
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'access_compat'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_actions
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'actions' do
conf true
end

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_alias
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'alias' do
conf true
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_allowmethods
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'allowmethods'

View File

@@ -0,0 +1,50 @@
#
# Cookbook:: apache2
# Recipe:: apreq2
#
# modified from the python recipe by Jeremy Bingham
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'apache2::default'
case node['platform_family']
when 'debian'
package 'libapache2-mod-apreq2'
when 'suse'
package 'apache2-mod_apreq2' do
notifies :run, 'execute[generate-module-list]', :immediately
end
when 'rhel', 'fedora', 'amazon'
package 'libapreq2' do
notifies :run, 'execute[generate-module-list]', :immediately
end
# seems that the apreq lib is weirdly broken or something - it needs to be
# loaded as 'apreq', but on RHEL & derivitatives the file needs a symbolic
# link to mod_apreq.so.
link "#{node['apache']['libexec_dir']}/mod_apreq.so" do
to "#{node['apache']['libexec_dir']}/mod_apreq2.so"
only_if "test -f #{node['apache']['libexec_dir']}/mod_apreq2.so"
end
end
file "#{node['apache']['dir']}/conf.d/apreq.conf" do
content '# conf is under mods-available/apreq.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end
apache_module 'apreq'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_asis
#
# Copyright:: 2008-2009, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'asis'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_auth_basic
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'auth_basic'

View File

@@ -0,0 +1,68 @@
#
# Cookbook:: apache2
# Recipe:: mod_auth_cas
#
# Copyright:: 2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'apache2::default'
if node['apache']['mod_auth_cas']['from_source']
package node['apache']['devel_package']
git '/tmp/mod_auth_cas' do
repository 'git://github.com/Jasig/mod_auth_cas.git'
revision node['apache']['mod_auth_cas']['source_revision']
notifies :run, 'execute[compile mod_auth_cas]', :immediately
end
execute 'compile mod_auth_cas' do
command './configure && make && make install'
cwd '/tmp/mod_auth_cas'
not_if "test -f #{node['apache']['libexec_dir']}/mod_auth_cas.so"
end
template "#{node['apache']['dir']}/mods-available/auth_cas.load" do
source 'mods/auth_cas.load.erb'
owner 'root'
group node['apache']['root_group']
mode '0644'
end
else
case node['platform_family']
when 'debian'
package 'libapache2-mod-auth-cas'
when 'rhel', 'fedora', 'amazon'
yum_package 'mod_auth_cas' do
notifies :run, 'execute[generate-module-list]', :immediately
end
file "#{node['apache']['dir']}/conf.d/auth_cas.conf" do
content '# conf is under mods-available/auth_cas.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end
end
end
apache_module 'auth_cas' do
conf true
end
directory "#{node['apache']['cache_dir']}/mod_auth_cas" do
owner node['apache']['user']
group node['apache']['group']
mode '0700'
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_auth_digest
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'auth_digest'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_auth_form
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'auth_form'

View File

@@ -0,0 +1,122 @@
#
# Cookbook:: apache2
# Recipe:: mod_auth_openid
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
openid_dev_pkgs = value_for_platform_family(
'debian' => %W(automake make g++ #{node['apache']['devel_package']} libopkele-dev libopkele3 libtool),
'suse' => %W(automake make g++ #{node['apache']['devel_package']} libopkele-dev libopkele3 libtool),
%w(rhel fedora amazon) => %W(gcc-c++ #{node['apache']['devel_package']} curl-devel libtidy libtidy-devel sqlite-devel pcre-devel openssl-devel make libtool),
'arch' => %w(libopkele),
'freebsd' => %w(libopkele pcre sqlite3)
)
make_cmd = value_for_platform_family(
'freebsd' => { 'default' => 'gmake' },
'default' => 'make'
)
case node['platform_family']
when 'arch'
package 'tidyhtml'
pacman_aur openid_dev_pkgs.first do
action [:build, :install]
end
else
openid_dev_pkgs.each do |pkg|
package pkg
end
end
case node['platform_family']
when 'rhel', 'fedora', 'amazon'
remote_file "#{Chef::Config['file_cache_path']}/libopkele-2.0.4.tar.gz" do
source 'http://kin.klever.net/dist/libopkele-2.0.4.tar.gz'
mode '0644'
checksum '57a5bc753b7e80c5ece1e5968b2051b0ce7ed9ce4329d17122c61575a9ea7648'
end
bash 'install libopkele' do
cwd Chef::Config['file_cache_path']
# Ruby 1.8.6 does not have rpartition, unfortunately
syslibdir = node['apache']['lib_dir'][0..node['apache']['lib_dir'].rindex('/')]
code <<-EOH
tar zxvf libopkele-2.0.4.tar.gz
cd libopkele-2.0.4 && ./configure --prefix=/usr --libdir=#{syslibdir}
#{make_cmd} && #{make_cmd} install
EOH
creates "#{syslibdir}/libopkele.a"
end
end
version = node['apache']['mod_auth_openid']['version']
configure_flags = node['apache']['mod_auth_openid']['configure_flags']
remote_file "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}.tar.gz" do
source node['apache']['mod_auth_openid']['source_url']
mode '0644'
action :create_if_missing
end
directory node['apache']['mod_auth_openid']['cache_dir'] do
owner node['apache']['user']
group node['apache']['group']
mode '0700'
end
bash 'untar mod_auth_openid' do
cwd Chef::Config['file_cache_path']
code <<-EOH
tar zxvf mod_auth_openid-#{version}.tar.gz
EOH
creates "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}/src/types.h"
end
bash 'compile mod_auth_openid' do
cwd "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}"
code <<-EOH
./autogen.sh
./configure #{configure_flags.join(' ')}
perl -pi -e "s/-i -a -n 'authopenid'/-i -n 'authopenid'/g" Makefile
#{make_cmd}
EOH
creates "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}/src/.libs/mod_auth_openid.so"
notifies :run, 'bash[install-mod_auth_openid]', :immediately
not_if "test -f #{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}/src/.libs/mod_auth_openid.so"
end
bash 'install-mod_auth_openid' do
cwd "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}"
code <<-EOH
#{make_cmd} install
EOH
creates "#{node['apache']['libexec_dir']}/mod_auth_openid.so"
notifies :restart, 'service[apache2]'
not_if "test -f #{node['apache']['libexec_dir']}/mod_auth_openid.so"
end
template "#{node['apache']['dir']}/mods-available/authopenid.load" do
source 'mods/authopenid.load.erb'
owner 'root'
group node['apache']['root_group']
mode '0644'
end
apache_module 'authopenid' do
filename 'mod_auth_openid.so'
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authn_anon
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authn_anon'

View File

@@ -0,0 +1,23 @@
#
# Cookbook:: apache2
# Recipe:: mod_authn_core
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if node['apache']['version'] == '2.4'
apache_module 'authn_core'
else
Chef::Log.info('Ignoring apache2::mod_authn_core. not available until apache 2.4')
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authn_dbd
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authn_dbd'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authn_dbm
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authn_dbm'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authn_file
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authn_file'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authn_socache
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authn_socache'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authnz_fcgi
#
# Copyright:: 2016, Alexander van Zoest
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authnz_fcgi'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_authnz_ldap
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'apache2::mod_ldap'
apache_module 'authnz_ldap'

View File

@@ -0,0 +1,24 @@
#
# Cookbook:: apache2
# Recipe:: mod_authz_core
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if node['apache']['version'] == '2.4'
apache_module 'authz_core'
else
apache_module 'authz_default'
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authz_dbd
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authz_dbd'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authz_dbm
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authz_dbm'

View File

@@ -0,0 +1,21 @@
#
# Cookbook:: apache2
# Recipe:: mod_authz_default
#
# Copyright:: 2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
log 'apache2::mod_authz_default is deprecated in favor of apache2::mod_authz_core. Please adjust your cookbooks'
include_recipe 'apache2::mod_authz_core'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authz_groupfile
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authz_groupfile'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authz_host
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authz_host'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authz_owner
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authz_owner'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_authz_user
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'authz_user'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_autoindex
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'autoindex' do
conf true
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_buffer
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'buffer'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_cache
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'cache'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_cache_disk
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'cache_disk' do
conf true
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_cache_socache
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'cache_socache'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_cern_meta
#
# Copyright:: 2016, Alexander van Zoest
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'cern_meta'

View File

@@ -0,0 +1,26 @@
#
# Cookbook:: apache2
# Recipe:: mod_cgi
#
# Copyright:: 2008-2013, Chef Software, Inc.
# Copyright:: 2014, Viverae, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if node['apache']['mpm'] == 'prefork'
apache_module 'cgi'
else
Chef::Log.warn "apache::mod_cgi. Your MPM #{node['apache']['mpm']} seems to be threaded. Selecting cgid instead of cgi."
apache_module 'cgid'
end

View File

@@ -0,0 +1,23 @@
#
# Cookbook:: apache2
# Recipe:: mod_cgid
#
# Copyright:: 2013, OneHealth Solutions, Inc.
# Copyright:: 2014, Viverae, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'cgid' do
conf true
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_charset_lite
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'charset_lite'

View File

@@ -0,0 +1,30 @@
#
# Cookbook:: apache2
# Recipe:: mod_cloudflare
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apt_repository 'cloudflare' do
uri 'http://pkg.cloudflare.com'
distribution node['lsb']['codename']
components ['main']
key 'http://pkg.cloudflare.com/pubkey.gpg'
action :add
end
package 'libapache2-mod-cloudflare' do
notifies :restart, 'service[apache2]'
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_data
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'data'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_dav
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'dav'

View File

@@ -0,0 +1,23 @@
#
# Cookbook:: apache2
# Recipe:: mod_dav_fs
#
# Copyright:: 2011-2013, Atriso
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'apache2::mod_dav'
apache_module 'dav_fs' do
conf true
end

View File

@@ -0,0 +1,21 @@
#
# Cookbook:: apache2
# Recipe:: mod_dav_lock
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'apache2::mod_dav'
apache_module 'dav_lock'

View File

@@ -0,0 +1,39 @@
#
# Cookbook:: apache2
# Recipe:: mod_dav_svn
#
# Copyright:: 2008-2009, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'apache2::mod_dav'
package 'libapache2-svn' do
case node['platform_family']
when 'rhel', 'fedora', 'suse', 'amazon'
package_name 'mod_dav_svn'
else
package_name 'libapache2-svn'
end
end
case node['platform_family']
when 'rhel', 'fedora', 'suse', 'amazon'
file "#{node['apache']['dir']}/conf.d/subversion.conf" do
action :delete
backup false
end
end
apache_module 'dav_svn'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_dbd
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'dbd'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_deflate
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'deflate' do
conf true
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_dialup
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'dialup'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_dir
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'dir' do
conf true
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_dump_io
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'dumpio'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_echo
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'echo'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_env
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'env'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_expires
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'expires'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_ext_filter
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'ext_filter'

View File

@@ -0,0 +1,62 @@
#
# Cookbook:: apache2
# Recipe:: mod_fastcgi
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if node['apache']['mod_fastcgi']['install_method'] == 'package'
package node['apache']['mod_fastcgi']['package']
else
if platform_family?('debian')
package 'build-essential'
package node['apache']['devel_package']
elsif platform_family?('rhel', 'amazon')
%W(gcc make libtool #{node['apache']['devel_package']} apr-devel apr).each do |package|
package package do
action :upgrade
end
end
end
src_filepath = "#{Chef::Config['file_cache_path']}/fastcgi.tar.gz"
remote_file 'download fastcgi source' do
source node['apache']['mod_fastcgi']['download_url']
path src_filepath
backup false
end
top_dir = if platform_family?('debian')
node['apache']['build_dir']
else
node['apache']['lib_dir']
end
include_recipe 'apache2::default'
bash 'compile fastcgi source' do
notifies :run, 'execute[generate-module-list]', :immediately if platform_family?('rhel', 'amazon')
not_if "test -f #{node['apache']['dir']}/mods-available/fastcgi.conf"
cwd ::File.dirname(src_filepath)
code <<-EOH
tar zxf #{::File.basename(src_filepath)} &&
cd mod_fastcgi-* &&
cp Makefile.AP2 Makefile &&
make top_dir=#{top_dir} && make install top_dir=#{top_dir}
EOH
end
end
apache_module 'fastcgi' do
conf true
end

View File

@@ -0,0 +1,67 @@
#
# Cookbook:: apache2
# Recipe:: mod_fcgid
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if platform_family?('debian')
package 'libapache2-mod-fcgid'
elsif platform_family?('rhel', 'fedora', 'amazon')
package 'mod_fcgid' do
notifies :run, 'execute[generate-module-list]', :immediately
end
file "#{node['apache']['dir']}/conf.d/fcgid.conf" do
content '# conf is under mods-available/fcgid.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end
# CentOS 7 (and recent Fedoras) have Apache 2.4, where FCGI socket path
# and shared memory path is managed adequately without further involvment
# neccessary (subdirectory is created under /var/run/httpd).
#
# However, when the path is specified manually, that subdirectory is NOT
# created automatically if it doesn't already exist and Apache fails to
# start. Since in recent RHEL systems /var/run is on tmpfs, end result is
# that chef-created subdirectory disappears on shutdown, and Apache fails
# to start after server reboot. Best to leave out these two settings
# unset then.
if (node['platform_family'] == 'rhel') && (node['platform_version'].to_i == 6)
directory '/var/run/httpd/mod_fcgid' do
owner node['apache']['user']
group node['apache']['group']
recursive true
end
end
elsif platform_family?('suse')
apache_lib_path = node['apache']['lib_dir']
package node['apache']['devel_package']
bash 'install-fcgid' do
code <<-EOH
(cd #{Chef::Config['file_cache_path']}; wget http://superb-east.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.2.tgz)
(cd #{Chef::Config['file_cache_path']}; tar zxvf mod_fcgid.2.2.tgz)
(cd #{Chef::Config['file_cache_path']}; perl -pi -e 's!/usr/local/apache2!#{apache_lib_path}!g' ./mod_fcgid.2.2/Makefile)
(cd #{Chef::Config['file_cache_path']}/mod_fcgid.2.2; make install)
EOH
end
end
apache_module 'fcgid' do
conf true
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_file_cache
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'file_cache'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_filter
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'filter'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_headers
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'headers' do
restart true
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_heartbeat
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'heartbeat'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_heartmonitor
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'heartmonitor'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_http2
#
# Copyright:: 2016, Alexander van Zoest
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'http2'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_ident
#
# Copyright:: 2016, Alexander van Zoest
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'ident'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_include
#
# Copyright:: 2012-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'include' do
conf true
end

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_info
#
# Copyright:: 2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'info' do
conf true
end

View File

@@ -0,0 +1,30 @@
#
# Cookbook:: apache2
# Recipe:: jk
#
# Copyright:: 2013, Mike Babineau <michael.babineau@gmail.com>
# Copyright:: 2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package 'libapache2-mod-jk' do
case node['platform_family']
when 'rhel', 'fedora', 'suse', 'amazon'
package_name 'mod_jk'
else
package_name 'libapache2-mod-jk'
end
end
apache_module 'jk'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_lbmethod_bybusyness
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'lbmethod_bybusyness'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_lbmethod_byrequests
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'lbmethod_byrequests'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_lbmethod_bytraffic
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'lbmethod_bytraffic'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_lbmethod_heartbeat
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'lbmethod_heartbeat'

View File

@@ -0,0 +1,26 @@
#
# Cookbook:: apache2
# Recipe:: mod_ldap
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if platform_family?('rhel', 'amazon') && node['apache']['version'] == '2.4'
package 'mod_ldap'
end
apache_module 'ldap' do
conf true
end

View File

@@ -0,0 +1,24 @@
#
# Cookbook:: apache2
# Recipe:: mod_log_config
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if platform_family?('rhel', 'fedora', 'suse', 'arch', 'freebsd', 'amazon')
apache_module 'log_config'
else
include_recipe 'apache2::default'
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_log_debug
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'log_debug'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_log_forensic
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'log_forensic'

View File

@@ -0,0 +1,24 @@
#
# Cookbook:: apache2
# Recipe:: mod_logio
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if platform_family?('rhel', 'fedora', 'suse', 'arch', 'freebsd', 'amazon')
apache_module 'logio'
else
include_recipe 'apache2::default'
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_lua
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'lua'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_macro
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'macro'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_mime
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'mime' do
conf true
end

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_mime_magic
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'mime_magic' do
conf true
end

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_negotiation
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'negotiation' do
conf true
end

View File

@@ -0,0 +1,37 @@
#
# Cookbook:: apache2
# Recipe:: mod_pagespeed
#
# Copyright:: 2013, ZOZI
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if platform_family?('debian')
remote_file "#{Chef::Config[:file_cache_path]}/mod-pagespeed.deb" do
source node['apache2']['mod_pagespeed']['package_link']
mode '0644'
action :create_if_missing
end
package 'mod_pagespeed' do
source "#{Chef::Config[:file_cache_path]}/mod-pagespeed.deb"
action :install
end
apache_module 'pagespeed' do
conf true
end
else
Chef::Log.warn "apache::mod_pagespeed does not support #{node['platform_family']} yet, and is not being installed"
end

View File

@@ -0,0 +1,59 @@
#
# Cookbook:: apache2
# Recipe:: mod_perl
#
# adapted from the mod_python recipe by Jeremy Bingham
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
case node['platform_family']
when 'debian'
%w(libapache2-mod-perl2 libapache2-request-perl).each do |pkg|
package pkg
end
if node['platform'] == 'ubuntu' && node['platform_version'].to_f <= 14.04
package 'apache2-mpm-prefork'
end
if node['platform'] == 'debian' && node['platform_version'].to_f <= 8
package 'apache2-mpm-prefork'
end
when 'suse'
package 'apache2-mod_perl' do
notifies :run, 'execute[generate-module-list]', :immediately
end
package 'perl-Apache2-Request'
when 'rhel', 'fedora', 'amazon'
package 'mod_perl' do
notifies :run, 'execute[generate-module-list]', :immediately
end
package 'perl-libapreq2'
when 'freebsd'
if node['apache']['version'] == '2.4'
package 'ap24-mod_perl2'
else
package 'ap22-mod_perl2'
end
package 'p5-libapreq2'
end
file "#{node['apache']['dir']}/conf.d/perl.conf" do
content '# conf is under mods-available/perl.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end
apache_module 'perl'

View File

@@ -0,0 +1,101 @@
#
# Cookbook:: apache2
# Recipe:: mod_php5
#
# Copyright:: 2008-2013, Chef Software, Inc.
# Copyright:: 2014, OneHealth Solutions, Inc.
# Copyright:: 2014, Viverae, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if node['apache']['mpm'] != 'prefork'
Chef::Log.warn('apache2::mod_php generally is expected to be run under a non-threaded MPM, such as prefork')
Chef::Log.warn('See http://php.net/manual/en/faq.installation.php#faq.installation.apache2')
Chef::Log.warn("Currently the apache2 cookbook is configured to use the '#{node['apache']['mpm']}' MPM")
end
case node['platform_family']
when 'debian'
if node['platform'] == 'ubuntu' && node['platform_version'].to_f < 16.04
package 'libapache2-mod-php5'
elsif node['platform'] == 'debian' && node['platform_version'].to_f < 9
package 'libapache2-mod-php5'
else
package 'libapache2-mod-php'
end
when 'arch'
package 'php-apache' do
notifies :run, 'execute[generate-module-list]', :immediately
end
when 'rhel', 'amazon'
package 'which'
package 'php package' do
if node['platform_version'].to_f < 6.0 && node['platform'] != 'amazon'
package_name 'php53'
else
package_name 'php'
end
notifies :run, 'execute[generate-module-list]', :immediately
not_if 'which php'
end
when 'fedora'
package 'which'
package 'php' do
notifies :run, 'execute[generate-module-list]', :immediately
not_if 'which php'
end
when 'suse'
package 'which'
package 'php' do
notifies :run, 'execute[generate-module-list]', :immediately
not_if 'which php'
end
when 'freebsd'
%w(php56 libxml2).each do |pkg|
package pkg
end
%w(mod_php56).each do |pkg|
package pkg do
options '-I'
end
end
end unless node['apache']['mod_php']['install_method'] == 'source'
case node['platform_family']
when 'debian'
# on debian plaform_family php creates newly named incompatible config
file "#{node['apache']['dir']}/mods-available/php7.0.conf" do
content '# conf is under mods-available/php.conf - apache2 cookbook\n'
end
file "#{node['apache']['dir']}/mods-available/php7.0.load" do
content '# conf is under mods-available/php.load - apache2 cookbook\n'
end
when 'rhel', 'fedora', 'suse', 'amazon'
file "#{node['apache']['dir']}/conf.d/php.conf" do
content '# conf is under mods-available/php.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end
end
template "#{node['apache']['dir']}/mods-available/php.conf" do
source 'mods/php.conf.erb'
mode '0644'
notifies :reload, 'service[apache2]', :delayed
end
apache_module node['apache']['mod_php']['module_name'] do
conf false
filename node['apache']['mod_php']['so_filename']
end

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_php5
#
# Copyright:: 2008-2013, Chef Software, Inc.
# Copyright:: 2014, OneHealth Solutions, Inc.
# Copyright:: 2014, Viverae, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
log 'apache2::mod_php5 is deprecated in favor of apache2::mod_php. Please adjust your cookbooks'
include_recipe 'apache2::mod_php'

View File

@@ -0,0 +1,26 @@
#
# Cookbook:: apache2
# Recipe:: mod_privileges
#
# Copyright:: 2016, Alexander van Zoest
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# https://httpd.apache.org/docs/trunk/mod/mod_privileges.html
# Available in Apache 2.3 and up, on Solaris 10 and OpenSolaris platforms
if node['apache']['version'] == '2.4' && node['platform_family'] == 'solaris'
apache_module 'privileges'
else
log 'Ignoring apache2::mod_privileges. Not available until apache 2.3 and only on Solaris'
end

View File

@@ -0,0 +1,25 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'proxy' do
conf true
if node['platform'] == 'ubuntu' && node['platform_version'].to_f == 12.04
restart true
end
end

View File

@@ -0,0 +1,21 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_ajp
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'apache2::mod_proxy'
apache_module 'proxy_ajp'

View File

@@ -0,0 +1,27 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_balancer
#
# Copyright:: 2008-2013, Chef Software, Inc.
# Copyright:: 2014, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if !platform_family?('freebsd') && node['apache']['version'] == '2.4'
include_recipe 'apache2::mod_slotmem_shm'
end
apache_module 'proxy_balancer' do
conf true
end

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_connect
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'proxy_connect'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_express
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'proxy_express'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_fcgi
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'proxy_fcgi'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_fdpass
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'proxy_fdpass'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_ftp
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'proxy_ftp' do
conf true
end

View File

@@ -0,0 +1,25 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_html
#
# Copyright:: 2013, OneHealth Solutions, Inc.
# Copyright:: 2015, Alexander van Zoest
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
if node['apache']['version'] != '2.4' && node['platform_family'] == 'debian'
package 'libapache2-mod-proxy-html'
end
apache_module 'proxy_html'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_http
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include_recipe 'apache2::mod_proxy'
apache_module 'proxy_http'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_scgi
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'proxy_scgi'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_proxy_wstunnel
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'proxy_wstunnel'

View File

@@ -0,0 +1,44 @@
#
# Cookbook:: apache2
# Recipe:: mod_python
#
# Copyright:: 2008-2013, Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
case node['platform_family']
when 'debian'
package 'libapache2-mod-python'
when 'suse'
package 'apache2-mod_python' do
notifies :run, 'execute[generate-module-list]', :immediately
end
when 'rhel', 'fedora', 'amazon'
package 'mod_python' do
notifies :run, 'execute[generate-module-list]', :immediately
end
when 'freebsd'
if node['apache']['version'] == '2.4'
package 'ap24-mod_python35'
else
package 'ap22-mod_python35'
end
end
file "#{node['apache']['dir']}/conf.d/python.conf" do
content '# conf is under mods-available/python.conf - apache2 cookbook\n'
only_if { ::Dir.exist?("#{node['apache']['dir']}/conf.d") }
end
apache_module 'python'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_ratelimit
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'ratelimit'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_reflector
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'reflector'

View File

@@ -0,0 +1,20 @@
#
# Cookbook:: apache2
# Recipe:: mod_remoteip
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'remoteip'

View File

@@ -0,0 +1,22 @@
#
# Cookbook:: apache2
# Recipe:: mod_reqtimeout
#
# Copyright:: 2013, OneHealth Solutions, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
apache_module 'reqtimeout' do
conf true
end

Some files were not shown because too many files have changed in this diff Show More