Initial Chef repository
This commit is contained in:
parent
7e5401fc71
commit
ee4079fa85
|
@ -0,0 +1,8 @@
|
|||
current_dir = File.dirname(__FILE__)
|
||||
|
||||
cookbook_path ["#{current_dir}/../cookbooks", "#{current_dir}/../site-cookbooks"]
|
||||
node_path "nodes"
|
||||
role_path "roles"
|
||||
environment_path "environments"
|
||||
data_bag_path "data_bags"
|
||||
encrypted_data_bag_secret "#{current_dir}/encrypted_data_bag_secret"
|
|
@ -0,0 +1,29 @@
|
|||
Batali.define do
|
||||
source 'https://supermarket.chef.io'
|
||||
|
||||
cookbook 'mediawiki',
|
||||
git: 'https://github.com/67P/mediawiki-cookbook.git',
|
||||
ref: 'master'
|
||||
cookbook 'postfix'
|
||||
cookbook 'unattended-upgrades'
|
||||
cookbook 'application_nodejs',
|
||||
git: 'https://github.com/67p/application_nodejs.git',
|
||||
ref: 'master'
|
||||
cookbook 'users'
|
||||
cookbook 'chef-solo-search'
|
||||
cookbook 'sudo'
|
||||
cookbook 'hostname'
|
||||
cookbook 'redis',
|
||||
git: 'https://github.com/phlipper/chef-redis.git',
|
||||
ref: 'v0.5.6'
|
||||
cookbook 'ufw'
|
||||
cookbook 'ssh_known_hosts'
|
||||
cookbook 'nginx'
|
||||
cookbook 'build-essential'
|
||||
cookbook 'mysql'
|
||||
cookbook 'database'
|
||||
cookbook 'mysql2_chef_gem'
|
||||
cookbook 'omnibus_updater', '~> 1.0.4'
|
||||
end
|
||||
|
||||
# vim: set filetype=ruby
|
|
@ -0,0 +1,6 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'chef', '~> 12.4.1'
|
||||
gem 'batali', '~> 0.2.10'
|
||||
gem 'knife-solo'
|
||||
gem 'knife-solo_data_bag'
|
|
@ -0,0 +1,189 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.3.8)
|
||||
attribute_struct (0.2.16)
|
||||
batali (0.2.10)
|
||||
attribute_struct (~> 0.2.14)
|
||||
bogo (~> 0.1.20)
|
||||
bogo-cli (~> 0.1.18)
|
||||
bogo-config (~> 0.1.10)
|
||||
bogo-ui (~> 0.1.6)
|
||||
git
|
||||
grimoire (~> 0.2.3)
|
||||
http (~> 0.8.2)
|
||||
rack-cache
|
||||
bogo (0.1.26)
|
||||
hashie
|
||||
multi_json
|
||||
bogo-cli (0.1.20)
|
||||
bogo (>= 0.1.6)
|
||||
bogo-config
|
||||
bogo-ui
|
||||
slop (~> 3)
|
||||
bogo-config (0.1.12)
|
||||
attribute_struct
|
||||
bogo (>= 0.1.4, < 1.0)
|
||||
multi_json
|
||||
multi_xml
|
||||
bogo-ui (0.1.10)
|
||||
bogo
|
||||
command_line_reporter
|
||||
paint
|
||||
builder (3.2.2)
|
||||
chef (12.4.1)
|
||||
chef-config (= 12.4.1)
|
||||
chef-zero (~> 4.2, >= 4.2.2)
|
||||
diff-lcs (~> 1.2, >= 1.2.4)
|
||||
erubis (~> 2.7)
|
||||
ffi-yajl (~> 2.2)
|
||||
highline (~> 1.6, >= 1.6.9)
|
||||
mixlib-authentication (~> 1.3)
|
||||
mixlib-cli (~> 1.4)
|
||||
mixlib-log (~> 1.3)
|
||||
mixlib-shellout (>= 2.0.0.rc.0, < 3.0)
|
||||
net-ssh (~> 2.6)
|
||||
net-ssh-multi (~> 1.1)
|
||||
ohai (~> 8.0)
|
||||
plist (~> 3.1.0)
|
||||
pry (~> 0.9)
|
||||
rspec-core (~> 3.2)
|
||||
rspec-expectations (~> 3.2)
|
||||
rspec-mocks (~> 3.2)
|
||||
rspec_junit_formatter (~> 0.2.0)
|
||||
serverspec (~> 2.7)
|
||||
specinfra (~> 2.10)
|
||||
syslog-logger (~> 1.6)
|
||||
chef-config (12.4.1)
|
||||
mixlib-config (~> 2.0)
|
||||
mixlib-shellout (~> 2.0)
|
||||
chef-zero (4.2.3)
|
||||
ffi-yajl (>= 1.1, < 3.0)
|
||||
hashie (~> 2.0)
|
||||
mixlib-log (~> 1.3)
|
||||
rack
|
||||
uuidtools (~> 2.1)
|
||||
coderay (1.1.0)
|
||||
colored (1.2)
|
||||
command_line_reporter (3.3.5)
|
||||
colored (>= 1.2)
|
||||
diff-lcs (1.2.5)
|
||||
domain_name (0.5.24)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
erubis (2.7.0)
|
||||
ffi (1.9.10)
|
||||
ffi-yajl (2.2.2)
|
||||
libyajl2 (~> 1.2)
|
||||
git (1.2.9.1)
|
||||
grimoire (0.2.6)
|
||||
attribute_struct (>= 0.1.12)
|
||||
bogo (~> 0.1.10)
|
||||
hashie (2.1.2)
|
||||
highline (1.7.2)
|
||||
http (0.8.12)
|
||||
addressable (~> 2.3)
|
||||
http-cookie (~> 1.0)
|
||||
http-form_data (~> 1.0.1)
|
||||
http_parser.rb (~> 0.6.0)
|
||||
http-cookie (1.0.2)
|
||||
domain_name (~> 0.5)
|
||||
http-form_data (1.0.1)
|
||||
http_parser.rb (0.6.0)
|
||||
ipaddress (0.8.0)
|
||||
knife-solo (0.4.2)
|
||||
chef (>= 10.12)
|
||||
erubis (~> 2.7.0)
|
||||
net-ssh (>= 2.2.2, < 3.0)
|
||||
knife-solo_data_bag (1.1.0)
|
||||
libyajl2 (1.2.0)
|
||||
method_source (0.8.2)
|
||||
mime-types (2.6.1)
|
||||
mixlib-authentication (1.3.0)
|
||||
mixlib-log
|
||||
mixlib-cli (1.5.0)
|
||||
mixlib-config (2.2.1)
|
||||
mixlib-log (1.6.0)
|
||||
mixlib-shellout (2.1.0)
|
||||
multi_json (1.11.2)
|
||||
multi_xml (0.5.5)
|
||||
net-scp (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (2.9.2)
|
||||
net-ssh-gateway (1.2.0)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh-multi (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh-gateway (>= 1.2.0)
|
||||
net-telnet (0.1.1)
|
||||
ohai (8.5.0)
|
||||
ffi (~> 1.9)
|
||||
ffi-yajl (~> 2.2)
|
||||
ipaddress
|
||||
mime-types (~> 2.0)
|
||||
mixlib-cli
|
||||
mixlib-config (~> 2.0)
|
||||
mixlib-log
|
||||
mixlib-shellout (~> 2.0)
|
||||
rake (~> 10.1)
|
||||
systemu (~> 2.6.4)
|
||||
wmi-lite (~> 1.0)
|
||||
paint (1.0.0)
|
||||
plist (3.1.0)
|
||||
pry (0.10.1)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
rack (1.6.4)
|
||||
rack-cache (1.2)
|
||||
rack (>= 0.4)
|
||||
rake (10.4.2)
|
||||
rspec (3.3.0)
|
||||
rspec-core (~> 3.3.0)
|
||||
rspec-expectations (~> 3.3.0)
|
||||
rspec-mocks (~> 3.3.0)
|
||||
rspec-core (3.3.2)
|
||||
rspec-support (~> 3.3.0)
|
||||
rspec-expectations (3.3.1)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.3.0)
|
||||
rspec-its (1.2.0)
|
||||
rspec-core (>= 3.0.0)
|
||||
rspec-expectations (>= 3.0.0)
|
||||
rspec-mocks (3.3.2)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.3.0)
|
||||
rspec-support (3.3.0)
|
||||
rspec_junit_formatter (0.2.3)
|
||||
builder (< 4)
|
||||
rspec-core (>= 2, < 4, != 2.12.0)
|
||||
serverspec (2.19.0)
|
||||
multi_json
|
||||
rspec (~> 3.0)
|
||||
rspec-its
|
||||
specinfra (~> 2.35)
|
||||
sfl (2.2)
|
||||
slop (3.6.0)
|
||||
specinfra (2.37.8)
|
||||
net-scp
|
||||
net-ssh (~> 2.7)
|
||||
net-telnet
|
||||
sfl
|
||||
syslog-logger (1.6.8)
|
||||
systemu (2.6.5)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.1)
|
||||
uuidtools (2.1.5)
|
||||
wmi-lite (1.0.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
batali (~> 0.2.10)
|
||||
chef (~> 12.4.1)
|
||||
knife-solo
|
||||
knife-solo_data_bag
|
||||
|
||||
BUNDLED WITH
|
||||
1.10.5
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
|
||||
## Bootstrap
|
||||
|
||||
```
|
||||
knife solo prepare root@dev.kosmos.org
|
||||
```
|
||||
|
||||
|
||||
## Run Chef
|
||||
|
||||
```
|
||||
knife solo cook dev.kosmos.org
|
||||
```
|
|
@ -0,0 +1,13 @@
|
|||
7-zip Cookbook CHANGELOG
|
||||
========================
|
||||
This file is used to list changes made in each version of the 7-zip cookbook.
|
||||
|
||||
|
||||
v1.0.2
|
||||
------
|
||||
### Improvement
|
||||
- **[COOK-3476](https://tickets.opscode.com/browse/COOK-3476)** - Upgrade to 7-zip 9.22
|
||||
|
||||
1.0.0
|
||||
-----
|
||||
- initial release
|
|
@ -0,0 +1,50 @@
|
|||
7-zip Cookbook
|
||||
==============
|
||||
[7-Zip](http://www.7-zip.org/) is a file archiver with a high compression ratio. This cookbook installs the full 7-zip suite of tools (GUI and CLI).
|
||||
|
||||
|
||||
Requirements
|
||||
------------
|
||||
### Platform
|
||||
- Windows XP
|
||||
- Windows Vista
|
||||
- Windows Server 2003 R2
|
||||
- Windows 7
|
||||
- Windows Server 2008 (R1, R2)
|
||||
- Windows 8
|
||||
- Windows Server 2012
|
||||
|
||||
### Cookbooks
|
||||
- windows
|
||||
|
||||
|
||||
Attributes
|
||||
----------
|
||||
- `node['7-zip']['home']` - location to install 7-zip files to. default is `%SYSTEMDRIVE%\7-zip`
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
### default
|
||||
Downloads and installs 7-zip to the location specified by `node['7-zip']['home']`. Also ensures `node['7-zip']['home']` is in the system path.
|
||||
|
||||
|
||||
License & Authors
|
||||
-----------------
|
||||
- Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
|
||||
```text
|
||||
Copyright:: 2011, Opscode, 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.
|
||||
```
|
|
@ -0,0 +1,31 @@
|
|||
#
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Cookbook Name:: 7-zip
|
||||
# Attribute:: default
|
||||
#
|
||||
# Copyright:: Copyright (c) 2011 Opscode, 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 kernel['machine'] =~ /x86_64/
|
||||
default['7-zip']['url'] = "http://downloads.sourceforge.net/sevenzip/7z922-x64.msi"
|
||||
default['7-zip']['checksum'] = "f09bf515289eea45185a4cc673e3bbc18ce608c55b4cf96e77833435c9cdf3dc"
|
||||
default['7-zip']['package_name'] = "7-Zip 9.22 (x64 edition)"
|
||||
else
|
||||
default['7-zip']['url'] = "http://downloads.sourceforge.net/sevenzip/7z922.msi"
|
||||
default['7-zip']['checksum'] = "86df264d22c3dd3ab80cb55a118da2d41bdd95c2db2cd09a6bbdf48f069e3d7a"
|
||||
default['7-zip']['package_name'] = "7-Zip 9.22"
|
||||
end
|
||||
|
||||
default['7-zip']['home'] = "#{ENV['SYSTEMDRIVE']}\\7-zip"
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"name": "7-zip",
|
||||
"version": "1.0.2",
|
||||
"description": "Installs/Configures the 7-zip file archiver",
|
||||
"long_description": "7-zip Cookbook\n==============\n[7-Zip](http://www.7-zip.org/) is a file archiver with a high compression ratio. This cookbook installs the full 7-zip suite of tools (GUI and CLI).\n\n\nRequirements\n------------\n### Platform\n- Windows XP\n- Windows Vista\n- Windows Server 2003 R2\n- Windows 7\n- Windows Server 2008 (R1, R2)\n- Windows 8\n- Windows Server 2012\n\n### Cookbooks\n- windows\n\n\nAttributes\n----------\n- `node['7-zip']['home']` - location to install 7-zip files to. default is `%SYSTEMDRIVE%\\7-zip`\n\n\nUsage\n-----\n### default\nDownloads and installs 7-zip to the location specified by `node['7-zip']['home']`. Also ensures `node['7-zip']['home']` is in the system path.\n\n\nLicense & Authors\n-----------------\n- Author:: Seth Chisamore (<schisamo@opscode.com>)\n\n```text\nCopyright:: 2011, Opscode, Inc.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n",
|
||||
"maintainer": "Opscode, Inc.",
|
||||
"maintainer_email": "cookbooks@opscode.com",
|
||||
"license": "Apache 2.0",
|
||||
"platforms": {
|
||||
"windows": ">= 0.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"windows": ">= 1.2.2"
|
||||
},
|
||||
"recommendations": {
|
||||
},
|
||||
"suggestions": {
|
||||
},
|
||||
"conflicting": {
|
||||
},
|
||||
"providing": {
|
||||
},
|
||||
"replacing": {
|
||||
},
|
||||
"attributes": {
|
||||
},
|
||||
"groupings": {
|
||||
},
|
||||
"recipes": {
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
name "7-zip"
|
||||
maintainer "Opscode, Inc."
|
||||
maintainer_email "cookbooks@opscode.com"
|
||||
license "Apache 2.0"
|
||||
description "Installs/Configures the 7-zip file archiver"
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version "1.0.2"
|
||||
supports "windows"
|
||||
|
||||
depends "windows", ">= 1.2.2"
|
|
@ -0,0 +1,31 @@
|
|||
#
|
||||
# Author:: Seth Chisamore (<schisamo@opscode.com>)
|
||||
# Cookbook Name:: 7-zip
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2011, Opscode, 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.
|
||||
#
|
||||
|
||||
windows_package node['7-zip']['package_name'] do
|
||||
source node['7-zip']['url']
|
||||
checksum node['7-zip']['checksum']
|
||||
options "INSTALLDIR=\"#{node['7-zip']['home']}\""
|
||||
action :install
|
||||
end
|
||||
|
||||
# update path
|
||||
windows_path node['7-zip']['home'] do
|
||||
action :add
|
||||
end
|
|
@ -0,0 +1,414 @@
|
|||
apache2 Cookbook Changelog
|
||||
==========================
|
||||
This file is used to list changes made in each version of the apache2 cookbook.
|
||||
|
||||
v3.1.0 (2015-05-25)
|
||||
-------------------
|
||||
|
||||
- [GH-315] Fix `apache.default_site_name` .conf extension references to ensure deletion
|
||||
- [GH-258] Use `apache.default_site_name` for consistency, minimize hardcoding of filenames
|
||||
- [GH-259] Add `&& sleep 1` to end of apache restart command on rhel-based systems using apache2.2
|
||||
- [GH-271] Remove FreeBSD 9.x, Red Hat and CentOS 5.x and OpenSUSE 11.x Series from tests and focus on newer releases
|
||||
- [GH-276] Add psych gem to development gems
|
||||
- [GH-293] Add `apache.mod_fastcgi.install_method` flag to allow install of mod_fastcgi from source (even on Debian family)
|
||||
- [GH-285] Made `apache.devel_package` configurable based on platform, including support for Amazon Linux.
|
||||
- [GH-316] Update Opscode references to Chef
|
||||
- [GH-318] Apply default recipe in all definitions
|
||||
- [GH-320] Add attribute to adjust `apache.default_site_port`
|
||||
- [GH-321] Fix issue with default_site name in not_if guards
|
||||
- [GH-322] Add `apache.mod_ssl.pkg_name` to allow custom mod_ssl package names. Set defaults for supported platforms including Amazon Linux
|
||||
- [GH-323] Don't create the default site configuration file in `sites-available` unless it is enabled.
|
||||
- [GH-324] Add `apache.mod_ssl.port` to set the default ssl port to something other than 443
|
||||
- [GH-328] Add the ability to pass in a pipe as to log
|
||||
- [GH-332] `SSLStrictSNIVHostCheck` is only written to config if enabled to avoid breaking apache prior to 2.2.12.
|
||||
- [GH-334] Removed `iptables`, `god-monitor`, and `logrotate` recipes to avoid having external dependencies. These services should be managed in a wrapper cookbook going forward.
|
||||
- [GH-339] Allow custom names for php so_filename (`node['apache']['mod_php5']['so_filename']`)
|
||||
|
||||
|
||||
v3.0.1 (2015-02-11)
|
||||
-------------------
|
||||
|
||||
- [GH-310] Ubuntu Apache 2.2 requires the lock_dir to be owned by www-data
|
||||
- [GH-309] Clarify that apache.version is a string
|
||||
- [GH-305] Restart service after MPM changes
|
||||
- [GH-304] Don't install systemd module on Amazon Linux
|
||||
- [GH-298] Add non-threaded MPM break notice for PHP users
|
||||
- [GH-296] Create lock_dir automatically
|
||||
|
||||
v3.0.0 (2014-11-30)
|
||||
-------------------
|
||||
Major version update because of SSL Improvements and new platform MPM and Version defaults.
|
||||
|
||||
- [GH-286] Refactor MPM and Apache version defaults: default is now apache 2.4
|
||||
- Note: set `apache.mpm` to `prefork` if you are using `mod_php` in Ubuntu >=14.04
|
||||
- [GH-281] mod_ssl: Disable SSLv3 by default to protect against POODLE attack (CVE-2014-3566)
|
||||
- [GH-280] mod_ssl: Major update with modern Cipher Suite, and best practices.
|
||||
Updated to a more modern default `apache.mod_ssl.cipher_suite`.
|
||||
Added the following additional mod_ssl attributes
|
||||
* `apache.mod_ssl.honor_cipher_order`
|
||||
* `apache.mod_ssl.insecure_renegotiation`
|
||||
* `apache.mod_ssl.strict_sni_vhost_check`
|
||||
* `apache.mod_ssl.session_cache_timeout`
|
||||
* `apache.mod_ssl.compression`
|
||||
* `apache.mod_ssl.use_stapling`
|
||||
* `apache.mod_ssl.stapling_responder_timeout`
|
||||
* `apache.mod_ssl.stapling_return_responder_errors`
|
||||
* `apache.mod_ssl.stapling_cache`
|
||||
* `apache.mod_ssl.pass_phrase_dialog`
|
||||
* `apache.mod_ssl.mutex`
|
||||
* `apache.mod_ssl.directives`
|
||||
- [GH-278] Improved chefspec tests execution time
|
||||
- [GH-277] Optimize files watching for Guard on Win32 platform
|
||||
- [GH-270] Don't attempt start until after configuration is written
|
||||
- [GH-268] Now uses chefspec 4.1
|
||||
- [GH-267] Use Supermarket as the Berkshelf 3 source
|
||||
- [GH-266] Rubocop based ruby style/syntax improvements
|
||||
- [GH-264] mod_ssl: Add new attribute for to be ready to any custom directive
|
||||
- [GH-249] Don't prepend Apache log path when requesting error logging to syslog
|
||||
- [GH-247] Explicitly include mod_ldap before mod_authnz_ldap
|
||||
- [GH-243] Expand mpm options for different distros/versions.
|
||||
- [GH-239] Added `apache.mod_php5.install_method` attribute defaults to `package`. Install packages unless PHP is compiled from source.
|
||||
- OneHealth Solutions was acquired by Viverae
|
||||
- Remove ArchLinux pacman as a dependency and handle similar to apt, yum, zypper
|
||||
- Adjust ubuntu apache 2.4 docroot_dir to match package (from /var/www to /var/www/html)
|
||||
- [GH-238] Bump service config syntax check guard timeout to 10 seconds
|
||||
- [GH-235] Removed `apache2::mpm_itk` which is not part of core and therefore should be its own cookbook
|
||||
- [GH-234] /var/run/httpd/mod_fcgid directory now belongs to apache on Fedora/RHEL systems.
|
||||
- [GH-233] Default web_app template should return 503 status code when maintenance file is present
|
||||
- [GH-232] Cookbook now deletes a2* if they are symlinks before dropping template versions
|
||||
- [GH-222] Set TraceEnable to off by default.
|
||||
- [GH-213] Adjust chefspec to use the package resource on FreeBSD (previously freebsd_package)
|
||||
- [GH-212] New attribute apache.locale which sets LANG. defaults to 'C'
|
||||
- [GH-210] Clarify web_app definition usage around configuration templates.
|
||||
- [GH-208] `apache_conf` now accepts `source` and `cookbook` parameters.
|
||||
|
||||
v2.0.0 (2014-08-06)
|
||||
--------------------
|
||||
Major version update because of major overhaul to support Apache 2.4 and a2enconf and a2endisconf changes.
|
||||
|
||||
- [GH-204] mod_auth_openid: Added `apache.mod_auth_openid.version` attribute
|
||||
- FreeBSD support has been improved with the release of chef 11.14.2, portsnap is no longer used in favor of pkgng.
|
||||
- [GH-157] - Apache will only be started when a configuration test passes, this allows the chef run to fix any broken configuration without failing the chef run.
|
||||
- `apache.log_dir` directory is now 0755 on all platforms (including the debian platform family)
|
||||
- [GH-166, GH-173] - `conf.d` is no longer used and replaced by `conf-available` and `conf-enabled` managed via the `a2enconf` and `a2disconf` scripts
|
||||
- [GH-166, GH-173] - All configuration files need to end in `.conf` for them to be loaded
|
||||
- [GH-173] - Perl is a required package on all platforms to support the a2* scripts as we now use the debian versions directly.
|
||||
- [GH-193] - per MPM settings: `maxclients` is now `maxrequestworkers`
|
||||
- [GH-194] - per MPM settings: `maxrequestsperchild` is now `maxconnectionsperchild`
|
||||
- [GH-161] - Added support for CentOS 7
|
||||
- [GH-180] - Improved SuSE support
|
||||
- [GH-100] - Apache HTTP 2.4 support
|
||||
This provides Apache 2.4 support in a backwards compatible way.
|
||||
It adds the following new attributes:
|
||||
- `apache.version` - This defaults to `2.2` and if changed to `2.4`; it triggers and assumes 2.4 packages will be installed.
|
||||
- `apache.mpm` - In 2.4 mode, this specifies which mpm to install. Default is `prefork`.
|
||||
- `apache.run_dir`
|
||||
- `apache.lock_dir`
|
||||
- `apache.libexec_dir` replaces `apache.libexecdir`
|
||||
- `apache.prefork.maxrequestworkers` replaces `apache.prefork.maxclients`
|
||||
- `apache.prefork.maxconnectionsperchild` replaces `apache.prefork.maxrequestsperchild`
|
||||
- `apache.worker.threadlimit`
|
||||
- `apache.worker.maxrequestworkers` replaces `apache.worker.maxclients`
|
||||
- `apache.worker.maxconnectionsperchild `replaces `apache.worker.maxrequestsperchild`
|
||||
- `apache.event.startservers`
|
||||
- `apache.event.serverlimit`
|
||||
- `apache.event.minsparethreads`
|
||||
- `apache.event.maxsparethreads`
|
||||
- `apache.event.threadlimit`
|
||||
- `apache.event.threadsperchild`
|
||||
- `apache.event.maxrequestworkers`
|
||||
- `apache.event.maxconnectionsperchild`
|
||||
- `apache.itk.startservers`
|
||||
- `apache.itk.minspareservers`
|
||||
- `apache.itk.maxspareservers`
|
||||
- `apache.itk.maxrequestworkers`
|
||||
- `apache.itk.maxconnectionsperchild`
|
||||
|
||||
Apache 2.4 Upgrade Notes:
|
||||
|
||||
Since the changes between apache 2.2 and apache 2.4 are pretty significant, we are unable to account for all changes needed for your upgrade. Please take a moment to familiarize yourself with the Apache Software Foundation provided upgrade documentation before attempting to use this cookbook with apache 2.4. See http://httpd.apache.org/docs/current/upgrading.html
|
||||
|
||||
- This cookbook does not automatically specify which version of apache to install. We are at the mercy of the `package` provider. It is important, however, to make sure that you configure the `apache.version` attribute to match. For your convenience, we try to set reasonable defaults based on different platforms in our test suite.
|
||||
- `mod_proxy` - In 2.4 mode, `apache.proxy.order`, `apache.proxy.deny_from`, `apache.proxy.allow_from` are ignored, as the attributes can not be supported in a backwards compatible way. Please use `apache.proxy.require` instead.
|
||||
|
||||
v1.11.0 (2014-07-25)
|
||||
--------------------
|
||||
- [GH-152] - Checking if server_aliases is defined in example
|
||||
- [GH-106] - Only turn rewrite on once in web_app.conf.erb
|
||||
- [GH-156] - Correct mod_basic/digest recipe names in README
|
||||
- Recipe iptables now includes the iptables::default recipe
|
||||
- Upgrade test-kitchen to latest version
|
||||
- Replaced minitest integration tests with serverspec tests
|
||||
- Added chefspec tests
|
||||
|
||||
|
||||
v1.10.4 (2014-04-23)
|
||||
--------------------
|
||||
- [COOK-4249] mod_proxy_http requires mod_proxy
|
||||
|
||||
|
||||
v1.10.2 (2014-04-09)
|
||||
--------------------
|
||||
- [COOK-4490] - Fix minitest `apache_configured_ports` helper
|
||||
- [COOK-4491] - Fix minitest: escape regex interpolation
|
||||
- [COOK-4492] - Fix service[apache2] CHEF-3694 duplication
|
||||
- [COOK-4493] - Fix template[ports.conf] CHEF-3694 duplication
|
||||
|
||||
As of 2014-04-04 and per [Community Cookbook Diversification](https://wiki.chef.io/display/chef/Community+Cookbook+Diversification) this cookbook now maintained by OneHealth Solutions. Please be patient as we get into the swing of things.
|
||||
|
||||
v1.10.0 (2014-03-28)
|
||||
--------------------
|
||||
- [COOK-3990] - Fix minitest failures on EL5
|
||||
- [COOK-4416] - Support the ability to point to local apache configs
|
||||
- [COOK-4469] - Use reload instead of restart on RHEL
|
||||
|
||||
|
||||
v1.9.6 (2014-02-28)
|
||||
-------------------
|
||||
[COOK-4391] - uncommenting the PIDFILE line
|
||||
|
||||
|
||||
v1.9.4 (2014-02-27)
|
||||
-------------------
|
||||
Bumping version for toolchain
|
||||
|
||||
|
||||
v1.9.1 (2014-02-27)
|
||||
-------------------
|
||||
[COOK-4348] Allow arbitrary params in sysconfig
|
||||
|
||||
|
||||
v1.9.0 (2014-02-21)
|
||||
-------------------
|
||||
### Improvement
|
||||
- **[COOK-4076](https://tickets.chef.io/browse/COOK-4076)** - foodcritic: dependencies are not defined properly
|
||||
- **[COOK-2572](https://tickets.chef.io/browse/COOK-2572)** - Add mod_pagespeed recipe to apache2
|
||||
|
||||
### Bug
|
||||
- **[COOK-4043](https://tickets.chef.io/browse/COOK-4043)** - apache2 cookbook does not depend on 'iptables'
|
||||
- **[COOK-3919](https://tickets.chef.io/browse/COOK-3919)** - Move the default pidfile for apache2 on Ubuntu 13.10 or greater
|
||||
- **[COOK-3863](https://tickets.chef.io/browse/COOK-3863)** - Add recipe for mod_jk
|
||||
- **[COOK-3804](https://tickets.chef.io/browse/COOK-3804)** - Fix incorrect datatype for apache/default_modules, use recipes option in metadata
|
||||
- **[COOK-3800](https://tickets.chef.io/browse/COOK-3800)** - Cannot load modules that use non-standard module identifiers
|
||||
- **[COOK-1689](https://tickets.chef.io/browse/COOK-1689)** - The perl package name should be configurable
|
||||
|
||||
|
||||
v1.8.14
|
||||
-------
|
||||
Version bump for toolchain sanity
|
||||
|
||||
|
||||
v1.8.12
|
||||
-------
|
||||
Fixing various style issues for travis
|
||||
|
||||
|
||||
v1.8.10
|
||||
-------
|
||||
fixing metadata version error. locking to 3.0"
|
||||
|
||||
|
||||
v1.8.8
|
||||
------
|
||||
Version bump for toolchain sanity
|
||||
|
||||
|
||||
v1.8.6
|
||||
------
|
||||
Locking yum dependency to '< 3'
|
||||
|
||||
|
||||
v1.8.4
|
||||
------
|
||||
### Bug
|
||||
- **[COOK-3769](https://tickets.chef.io/browse/COOK-3769)** - Fix a critical bug where the `apache_module` could not enable modules
|
||||
|
||||
|
||||
v1.8.2
|
||||
------
|
||||
### Bug
|
||||
- **[COOK-3766](https://tickets.chef.io/browse/COOK-3766)** - Fix an issue where the `mod_ssl` recipe fails due to a missing attribute
|
||||
|
||||
|
||||
v1.8.0
|
||||
------
|
||||
### Bug
|
||||
- **[COOK-3680](https://tickets.chef.io/browse/COOK-3680)** - Update template paths
|
||||
- **[COOK-3570](https://tickets.chef.io/browse/COOK-3570)** - Apache cookbook breaks on RHEL / CentOS 6
|
||||
- **[COOK-2944](https://tickets.chef.io/browse/COOK-2944)** - Fix foodcritic failures
|
||||
- **[COOK-2893](https://tickets.chef.io/browse/COOK-2893)** - Improve mod_auth_openid recipe with guards and idempotency
|
||||
- **[COOK-2758](https://tickets.chef.io/browse/COOK-2758)** - Fix use of non-existent attribute
|
||||
|
||||
### New Feature
|
||||
- **[COOK-3665](https://tickets.chef.io/browse/COOK-3665)** - Add recipe for mod_userdir
|
||||
- **[COOK-3646](https://tickets.chef.io/browse/COOK-3646)** - Add recipe for mod_cloudflare
|
||||
- **[COOK-3213](https://tickets.chef.io/browse/COOK-3213)** - Add recipe for mod_info
|
||||
|
||||
### Improvement
|
||||
- **[COOK-3656](https://tickets.chef.io/browse/COOK-3656)** - Parameterize apache2 binary
|
||||
- **[COOK-3562](https://tickets.chef.io/browse/COOK-3562)** - Allow mod_proxy settings to be configured as attributes
|
||||
- **[COOK-3326](https://tickets.chef.io/browse/COOK-3326)** - Fix default_test to use ServerTokens attribute
|
||||
- **[COOK-2635](https://tickets.chef.io/browse/COOK-2635)** - Add support for SVG mime types
|
||||
- **[COOK-2598](https://tickets.chef.io/browse/COOK-2598)** - FastCGI Module only works on Debian-based platforms
|
||||
- **[COOK-1984](https://tickets.chef.io/browse/COOK-1984)** - Add option to configure the address apache listens to
|
||||
|
||||
|
||||
v1.7.0
|
||||
------
|
||||
### Improvement
|
||||
|
||||
- [COOK-3073]: make access.log location configurable per-platform
|
||||
- [COOK-3074]: don't hardcode the error.log location in the default site config
|
||||
- [COOK-3268]: don't hardcode DocumentRoot and cgi-bin locations in `default_site`
|
||||
|
||||
### New Feature
|
||||
|
||||
- [COOK-3184]: Add `mod_filter` recipe to Apache2-cookbook
|
||||
- [COOK-3236]: Add `mod_action` recipe to Apache2-cookbook
|
||||
|
||||
v1.6.6
|
||||
------
|
||||
1.6.4 had a missed step in the automated release, long live 1.6.6.
|
||||
|
||||
### Bug
|
||||
|
||||
- [COOK-3018]: apache2_module does duplicate delayed restart of apache2 service when conf = true
|
||||
- [COOK-3027]: Default site enable true, then false, does not disable default site
|
||||
- [COOK-3109]: fix apache lib_dir arch attribute regexp
|
||||
|
||||
v1.6.2
|
||||
------
|
||||
- [COOK-2535] - `mod_auth_openid` requires libtool to run autogen.sh
|
||||
- [COOK-2667] - Typo in usage documentation
|
||||
- [COOK-2461] - `apache2::mod_auth_openid` fails on some ubuntu systems
|
||||
- [COOK-2720] - Apache2 minitest helper function `ran_recipe` is not portable
|
||||
|
||||
v1.6.0
|
||||
------
|
||||
- [COOK-2372] - apache2 mpm_worker: add ServerLimit attribute (default to 16)
|
||||
|
||||
v1.5.0
|
||||
------
|
||||
The `mod_auth_openid` attributes are changed. The upstream maintainer deprecated the older release versions, and the source repository has releases available at specific SHA1SUM references. The new attribute, `node['apache']['mod_auth_openid']['ref']` is used to set this.
|
||||
|
||||
- [COOK-2198] - `apache::mod_auth_openid` compiles from source, but does not install make on debian/ubuntu
|
||||
- [COOK-2224] - version conflict between cucumber and other gems
|
||||
- [COOK-2248] - `apache2::mod_php5` uses `not_if` "which php" without ensuring package 'which' is installed
|
||||
- [COOK-2269] - Set allow list for mod_status incase external monitor scripts need
|
||||
- [COOK-2276] - cookbook apache2 documentation regarding listening ports doesn't match default attributes
|
||||
- [COOK-2296] - `mod_auth_openid` doesn't have tags/releases for the version I need for features and fixes
|
||||
- [COOK-2323] - Add Oracle linux support
|
||||
|
||||
v1.4.2
|
||||
------
|
||||
- [COOK-1721] - fix logrotate recipe
|
||||
|
||||
v1.4.0
|
||||
------
|
||||
- [COOK-1456] - iptables enhancements
|
||||
- [COOK-1473] - apache2 does not disable default site when setting "`default_site_enabled`" back to false
|
||||
- [COOK-1824] - the apache2 cookbook needs to specify which binary is used on rhel platform
|
||||
- [COOK-1916] - Download location wrong for apache2 `mod_auth_openid` >= 0.7
|
||||
- [COOK-1917] - Improve `mod_auth_openid` recipe to handle module upgrade more gracefully
|
||||
- [COOK-2029] - apache2 restarts on every run on RHEL and friends, generate-module-list on every run.
|
||||
- [COOK-2036] - apache2: Cookbook style
|
||||
|
||||
v1.3.2
|
||||
------
|
||||
- [COOK-1804] - fix `web_app` definition parameter so site can be disabled.
|
||||
|
||||
v1.3.0
|
||||
------
|
||||
- [COOK-1738] - Better configuration for `mod_include` and some overrides in `web_app` definition
|
||||
- [COOK-1470] - Change SSL Ciphers to Mitigate BEAST attack
|
||||
|
||||
v1.2.0
|
||||
------
|
||||
- [COOK-692] - delete package conf.d files in module recipes, for EL
|
||||
- [COOK-1693] - Foodcritic finding for unnecessary string interpolation
|
||||
- [COOK-1757] - platform_family and better style / usage practices
|
||||
|
||||
v1.1.16
|
||||
-------
|
||||
re-releasing as .16 due to error on tag 1.1.14
|
||||
|
||||
- [COOK-1466] - add `mod_auth_cas` recipe
|
||||
- [COOK-1609] - apache2 changes ports.conf twice per run when using apache2::mod_ssl
|
||||
|
||||
v1.1.12
|
||||
-------
|
||||
- [COOK-1436] - restore apache2 web_app definition
|
||||
- [COOK-1356] - allow ExtendedStatus via attribute
|
||||
- [COOK-1403] - add mod_fastcgi recipe
|
||||
|
||||
v1.1.10
|
||||
-------
|
||||
- [COOK-1315] - allow the default site to not be enabled
|
||||
- [COOK-1328] - cookbook tests (minitest, cucumber)
|
||||
|
||||
v1.1.8
|
||||
------
|
||||
- Some platforms with minimal installations that don't have perl won't have a `node['languages']['perl']` attribute, so remove the conditional and rely on the power of idempotence in the package resource.
|
||||
- [COOK-1214] - address foodcritic warnings
|
||||
- [COOK-1180] - add `mod_logio` and fix `mod_proxy`
|
||||
|
||||
v1.1.6
|
||||
------
|
||||
FreeBSD users: This release requires the `freebsd` cookbook. See README.md.
|
||||
|
||||
- [COOK-1025] - freebsd support in mod_php5 recipe
|
||||
|
||||
v1.1.4
|
||||
------
|
||||
- [COOK-1100] - support amazon linux
|
||||
|
||||
v1.1.2
|
||||
------
|
||||
- [COOK-996] - apache2::mod_php5 can cause PHP and module API mismatches
|
||||
- [COOK-1083] - return string for v_f_p and use correct value for default
|
||||
|
||||
v1.1.0
|
||||
------
|
||||
- [COOK-861] - Add `mod_perl` and apreq2
|
||||
- [COOK-941] - fix `mod_auth_openid` on FreeBSD
|
||||
- [COOK-1021] - add a commented-out LoadModule directive to keep apxs happy
|
||||
- [COOK-1022] - consistency for icondir attribute
|
||||
- [COOK-1023] - fix platform test for attributes
|
||||
- [COOK-1024] - fix a2enmod script so it runs cleanly on !bash
|
||||
- [COOK-1026] - fix `error_log` location on FreeBSD
|
||||
|
||||
v1.0.8
|
||||
------
|
||||
- COOK-548 - directory resource doesn't have backup parameter
|
||||
|
||||
v1.0.6
|
||||
------
|
||||
- COOK-915 - update to `mod_auth_openid` version 0.6, see __Recipes/mod_auth_openid__ below.
|
||||
- COOK-548 - Add support for FreeBSD.
|
||||
|
||||
v1.0.4
|
||||
------
|
||||
- COOK-859 - don't hardcode module paths
|
||||
|
||||
v1.0.2
|
||||
------
|
||||
- Tickets resolved in this release: COOK-788, COOK-782, COOK-780
|
||||
|
||||
v1.0.0
|
||||
------
|
||||
- Red Hat family support is greatly improved, all recipes except `god_monitor` converge.
|
||||
- Recipe `mod_auth_openid` now works on RHEL family distros
|
||||
- Recipe `mod_php5` will now remove config from package on RHEL family so it doesn't conflict with the cookbook's.
|
||||
- Added `php5.conf.erb` template for `mod_php5` recipe.
|
||||
- Create the run state directory for `mod_fcgid` to prevent a startup error on RHEL version 6.
|
||||
- New attribute `node['apache']['lib_dir']` to handle lib vs lib64 on RHEL family distributions.
|
||||
- New attribute `node['apache']['group']`.
|
||||
- Scientific Linux support added.
|
||||
- Use a file resource instead of the generate-module-list executed perl script on RHEL family.
|
||||
- "default" site can now be disabled.
|
||||
- web_app now has an "enable" parameter.
|
||||
- Support for dav_fs apache module.
|
||||
- Tickets resolved in this release: COOK-754, COOK-753, COOK-665, COOK-624, COOK-579, COOK-519, COOK-518
|
||||
- Fix node references in template for a2dissite
|
||||
- Use proper user and group attributes on files and templates.
|
||||
- Replace the anemic README.rdoc with this new and improved superpowered README.md :).
|
|
@ -0,0 +1,727 @@
|
|||
apache2 Cookbook
|
||||
================
|
||||
[![Cookbook Version](https://img.shields.io/cookbook/v/apache2.svg?style=flat)](https://supermarket.chef.io/cookbooks/apache2)
|
||||
[![Build Status](https://travis-ci.org/svanzoest-cookbooks/apache2.svg?branch=master)](https://travis-ci.org/svanzoest-cookbooks/apache2)
|
||||
[![Dependency Status](http://img.shields.io/gemnasium/svanzoest-cookbooks/apache2.svg?style=flat)](https://gemnasium.com/svanzoest-cookbooks/apache2)
|
||||
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/svanzoest-cookbooks/apache2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||
|
||||
This cookbook provides a complete Debian/Ubuntu style Apache HTTPD
|
||||
configuration. Non-Debian based distributions such as Red Hat/CentOS,
|
||||
ArchLinux and others supported by this cookbook will have a
|
||||
configuration that mimics Debian/Ubuntu style as it is easier to
|
||||
manage with Chef.
|
||||
|
||||
Debian-style Apache configuration uses scripts to manage modules and
|
||||
sites (vhosts). The scripts are:
|
||||
|
||||
* a2ensite
|
||||
* a2dissite
|
||||
* a2enmod
|
||||
* a2dismod
|
||||
* a2enconf
|
||||
* a2disconf
|
||||
|
||||
This cookbook ships with templates of these scripts for non
|
||||
Debian/Ubuntu platforms. The scripts are used in the __Definitions__
|
||||
below.
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
## Ohai and Chef:
|
||||
|
||||
* Ohai: 0.6.12+
|
||||
* Chef: 0.10.10+
|
||||
|
||||
As of v1.2.0, this cookbook makes use of `node['platform_family']` to
|
||||
simplify platform selection logic. This attribute was introduced in
|
||||
Ohai v0.6.12. The recipe methods were introduced in Chef v0.10.10. If
|
||||
you must run an older version of Chef or Ohai, use [version 1.1.16 of
|
||||
this cookbook](https://supermarket.chef.io/cookbooks/apache2/versions/1.1.16).
|
||||
|
||||
## Cookbooks:
|
||||
|
||||
This cookbook has no direct external dependencies.
|
||||
|
||||
Depending on your OS configuration and security policy, you may need
|
||||
additional recipes or cookbooks for this cookbook's recipes to
|
||||
converge on the node. In particular, the following Operating System
|
||||
settings may affect the behavior of this cookbook:
|
||||
|
||||
* apt cache outdated
|
||||
* SELinux enabled
|
||||
* IPtables
|
||||
* Compile tools
|
||||
* 3rd party repositories
|
||||
|
||||
On Ubuntu/Debian, use Opscode's `apt` cookbook to ensure the package
|
||||
cache is updated so Chef can install packages, or consider putting
|
||||
apt-get in your bootstrap process or
|
||||
[knife bootstrap template](http://docs.chef.io/knife_bootstrap.html)
|
||||
|
||||
On RHEL, SELinux is enabled by default. The `selinux` cookbook
|
||||
contains a `permissive` recipe that can be used to set SELinux to
|
||||
"Permissive" state. Otherwise, additional recipes need to be created
|
||||
by the user to address SELinux permissions.
|
||||
|
||||
The easiest but **certainly not ideal way** to deal with IPtables is
|
||||
to flush all rules. Chef Software does provide an `iptables` cookbook but is
|
||||
migrating from the approach used there to a more robust solution
|
||||
utilizing a general "firewall" LWRP that would have an "iptables"
|
||||
provider. Alternately, you can use ufw, with Opscode's `ufw` and
|
||||
`firewall` cookbooks to set up rules. See those cookbooks' READMEs for
|
||||
documentation.
|
||||
|
||||
Build/compile tools may not be installed on the system by default.
|
||||
Some recipes (e.g., `apache2::mod_auth_openid`) build the module from
|
||||
source. Use Opscode's `build-essential` cookbook to get essential
|
||||
build packages installed.
|
||||
|
||||
On ArchLinux, if you are using the `apache2::mod_auth_openid` recipe,
|
||||
you also need the `pacman` cookbook for the `pacman_aur` LWRP. Put
|
||||
`recipe[pacman]` on the node's expanded run list (on the node or in a
|
||||
role). This is not an explicit dependency because it is only required
|
||||
for this single recipe and platform; the pacman default recipe
|
||||
performs `pacman -Sy` to keep pacman's package cache updated.
|
||||
|
||||
## Platforms:
|
||||
|
||||
The following platforms and versions are tested and supported using
|
||||
[test-kitchen](http://kitchen.ci/)
|
||||
|
||||
* Ubuntu 12.04, 14.04
|
||||
* Debian 7.6
|
||||
* CentOS 6.5, 7.0
|
||||
|
||||
The following platform families are supported in the code, and are
|
||||
assumed to work based on the successful testing on Ubuntu and CentOS.
|
||||
|
||||
* Red Hat (rhel)
|
||||
* Fedora
|
||||
* Amazon Linux
|
||||
|
||||
The following platforms are also supported in the code, have been
|
||||
tested manually but are not tested under test-kitchen.
|
||||
|
||||
* SUSE/OpenSUSE
|
||||
* ArchLinux
|
||||
* FreeBSD
|
||||
|
||||
### Notes for RHEL Family:
|
||||
|
||||
On Red Hat Enterprise Linux and derivatives, the EPEL repository may
|
||||
be necessary to install packages used in certain recipes. The
|
||||
`apache2::default` recipe, however, does not require any additional
|
||||
repositories. Opscode's `yum-epel` cookbook can be used to add the
|
||||
EPEL repository. See __Examples__ for more information.
|
||||
|
||||
### Notes for FreeBSD:
|
||||
|
||||
Version 2.0 has been had some basic testing against FreeBSD 10.0 using
|
||||
Chef 11.14.2 which has support for pkgng (CHEF-4637).
|
||||
|
||||
Tests
|
||||
=====
|
||||
|
||||
This cookbook in the
|
||||
[source repository](https://github.com/svanzoest-cookbooks/apache2/)
|
||||
contains chefspec, serverspec and cucumber tests. This is an initial proof of
|
||||
concept that will be fleshed out with more supporting infrastructure
|
||||
at a future time.
|
||||
|
||||
Please see the CONTRIBUTING file for information on how to add tests
|
||||
for your contributions.
|
||||
|
||||
Attributes
|
||||
==========
|
||||
|
||||
This cookbook uses many attributes, broken up into a few different
|
||||
kinds.
|
||||
|
||||
Platform specific
|
||||
-----------------
|
||||
|
||||
In order to support the broadest number of platforms, several
|
||||
attributes are determined based on the node's platform. See the
|
||||
attributes/default.rb file for default values in the case statement at
|
||||
the top of the file.
|
||||
|
||||
* `node['apache']['package']` - Package name for Apache2
|
||||
* `node['apache']['perl_pkg']` - Package name for Perl
|
||||
* `node['apache']['dir']` - Location for the Apache configuration
|
||||
* `node['apache']['log_dir']` - Location for Apache logs
|
||||
* `node['apache']['error_log']` - Location for the default error log
|
||||
* `node['apache']['access_log']` - Location for the default access log
|
||||
* `node['apache']['user']` - User Apache runs as
|
||||
* `node['apache']['group']` - Group Apache runs as
|
||||
* `node['apache']['binary']` - Apache httpd server daemon
|
||||
* `node['apache']['conf_dir']` - Location for the main config file (e.g apache2.conf or httpd.conf)
|
||||
* `node['apache']['docroot_dir']` - Location for docroot
|
||||
* `node['apache']['cgibin_dir']` - Location for cgi-bin
|
||||
* `node['apache']['icondir']` - Location for icons
|
||||
* `node['apache']['cache_dir']` - Location for cached files used by Apache itself or recipes
|
||||
* `node['apache']['pid_file']` - Location of the PID file for Apache httpd
|
||||
* `node['apache']['lib_dir']` - Location for shared libraries
|
||||
* `node['apache']['default_site_enabled']` - Default site enabled. Default is false.
|
||||
* `node['apache']['ext_status']` - if true, enables ExtendedStatus for `mod_status`
|
||||
* `node['apache']['locale'] - Locale to set in sysconfig or envvars and used for subprocesses and modules (like mod_dav and mod_wsgi). On debian systems Uses system-local if set to 'system', defaults to 'C'.
|
||||
|
||||
General settings
|
||||
----------------
|
||||
|
||||
These are general settings used in recipes and templates. Default
|
||||
values are noted.
|
||||
|
||||
* `node['apache']['version']` - Specifing 2.4 triggers apache 2.4 support. If the platform is known during our test to install 2.4 by default, it will be set to 2.4 for you. Otherwise it falls back to 2.2. This value should be specified as a string.
|
||||
* `node['apache']['listen_addresses']` - Addresses that httpd should listen on. Default is any ("*").
|
||||
* `node['apache']['listen_ports']` - Ports that httpd should listen on. Default is port 80.
|
||||
* `node['apache']['contact']` - Value for ServerAdmin directive. Default "ops@example.com".
|
||||
* `node['apache']['timeout']` - Value for the Timeout directive. Default is 300.
|
||||
* `node['apache']['keepalive']` - Value for the KeepAlive directive. Default is On.
|
||||
* `node['apache']['keepaliverequests']` - Value for MaxKeepAliveRequests. Default is 100.
|
||||
* `node['apache']['keepalivetimeout']` - Value for the KeepAliveTimeout directive. Default is 5.
|
||||
* `node['apache']['sysconfig_additional_params']` - Additionals variables set in sysconfig file. Default is empty.
|
||||
* `node['apache']['default_modules']` - Array of module names. Can take "mod_FOO" or "FOO" as names, where FOO is the apache module, e.g. "`mod_status`" or "`status`".
|
||||
* `node['apache']['mpm']` - With apache.version 2.4, specifies what Multi-Processing Module to enable. Default is "prefork".
|
||||
|
||||
The modules listed in `default_modules` will be included as recipes in `recipe[apache::default]`.
|
||||
|
||||
Prefork attributes
|
||||
------------------
|
||||
|
||||
Prefork attributes are used for tuning the Apache HTTPD [prefork MPM](http://httpd.apache.org/docs/current/mod/prefork.html) configuration.
|
||||
|
||||
* `node['apache']['prefork']['startservers']` - initial number of server processes to start. Default is 16.
|
||||
* `node['apache']['prefork']['minspareservers']` - minimum number of spare server processes. Default 16.
|
||||
* `node['apache']['prefork']['maxspareservers']` - maximum number of spare server processes. Default 32.
|
||||
* `node['apache']['prefork']['serverlimit']` - upper limit on configurable server processes. Default 400.
|
||||
* `node['apache']['prefork']['maxrequestworkers']` - Maximum number of connections that will be processed simultaneously
|
||||
* `node['apache']['prefork']['maxconnectionsperchild']` - Maximum number of request a child process will handle. Default 10000.
|
||||
|
||||
Worker attributes
|
||||
-----------------
|
||||
|
||||
Worker attributes are used for tuning the Apache HTTPD [worker MPM](http://httpd.apache.org/docs/current/mod/worker.html)
|
||||
configuration.
|
||||
|
||||
* `node['apache']['worker']['startservers']` - Initial number of server processes to start. Default 4
|
||||
* `node['apache']['worker']['serverlimit']` - Upper limit on configurable server processes. Default 16.
|
||||
* `node['apache']['worker']['minsparethreads']` - Minimum number of spare worker threads. Default 64
|
||||
* `node['apache']['worker']['maxsparethreads']` - Maximum number of spare worker threads. Default 192.
|
||||
* `node['apache']['worker']['maxrequestworkers']` - Maximum number of simultaneous connections. Default 1024.
|
||||
* `node['apache']['worker']['maxconnectionsperchild']` - Limit on the number of connections that an individual child server will handle during its life.
|
||||
|
||||
Event attributes
|
||||
----------------
|
||||
|
||||
Event attributes are used for tuning the Apache HTTPD [event MPM](http://httpd.apache.org/docs/current/mod/event.html)
|
||||
configuration.
|
||||
|
||||
* `node['apache']['event']['startservers']` - Initial number of child server processes created at startup. Default 4.
|
||||
* `node['apache']['event']['serverlimit']` - Upper limit on configurable number of processes. Default 16.
|
||||
* `node['apache']['event']['minsparethreads']` - Minimum number of spare worker threads. Default 64
|
||||
* `node['apache']['event']['maxsparethreads']` - Maximum number of spare worker threads. Default 192.
|
||||
* `node['apache']['event']['threadlimit']` - Upper limit on the configurable number of threads per child process. Default 192.
|
||||
* `node['apache']['event']['threadsperchild']` - Number of threads created by each child process. Default 64.
|
||||
* `node['apache']['event']['maxrequestworkers']` - Maximum number of connections that will be processed simultaneously.
|
||||
* `node['apache']['event']['maxconnectionsperchild']` - Limit on the number of connections that an individual child server will handle during its life.
|
||||
|
||||
Other/Unsupported MPM
|
||||
---------------------
|
||||
|
||||
To use the cookbook with an unsupported mpm (other than prefork, event or worker):
|
||||
|
||||
* set `node['apache']['mpm']` to the name of the module (e.g. `itk`)
|
||||
* in your cookbook, after `include_recipe 'apache2'` use the `apache_module` definition to enable/disable the required module(s)
|
||||
|
||||
|
||||
mod\_auth\_openid attributes
|
||||
----------------------------
|
||||
|
||||
The following attributes are in the `attributes/mod_auth_openid.rb`
|
||||
file. Like all Chef attributes files, they are loaded as well, but
|
||||
they're logistically unrelated to the others, being specific to the
|
||||
`mod_auth_openid` recipe.
|
||||
|
||||
* `node['apache']['mod_auth_openid']['checksum']` - sha256sum of the tarball containing the source.
|
||||
* `node['apache']['mod_auth_openid']['ref']` - Any sha, tag, or branch found from https://github.com/bmuller/mod_auth_openid
|
||||
* `node['apache']['mod_auth_openid']['version']` - directory name version within the tarball
|
||||
* `node['apache']['mod_auth_openid']['cache_dir']` - the cache directory is where the sqlite3 database is stored. It is separate so it can be managed as a directory resource.
|
||||
* `node['apache']['mod_auth_openid']['dblocation']` - filename of the sqlite3 database used for directive `AuthOpenIDDBLocation`, stored in the `cache_dir` by default.
|
||||
* `node['apache']['mod_auth_openid']['configure_flags']` - optional array of configure flags passed to the `./configure` step in the compilation of the module.
|
||||
|
||||
mod\_ssl attributes
|
||||
-------------------
|
||||
|
||||
For general information on this attributes see http://httpd.apache.org/docs/current/mod/mod_ssl.html
|
||||
|
||||
* `node['apache']['mod_ssl']['cipher_suite']` - sets the SSLCiphersuite value to the specified string. The default is
|
||||
considered "sane" but you may need to change it for your local security policy, e.g. if you have PCI-DSS requirements. Additional
|
||||
commentary on the
|
||||
[original pull request](https://github.com/svanzoest-cookbooks/apache2/pull/15#commitcomment-1605406).
|
||||
* `node['apache']['mod_ssl']['honor_cipher_order']` - Option to prefer the server's cipher preference order. Default 'On'.
|
||||
* `node['apache']['mod_ssl']['insecure_renegotiation']` - Option to enable support for insecure renegotiation. Default 'Off'.
|
||||
* `node['apache']['mod_ssl']['strict_sni_vhost_check']` - Whether to allow non-SNI clients to access a name-based virtual host. Default 'Off'.
|
||||
* `node['apache']['mod_ssl']['session_cache']` - Configures the OCSP stapling cache. Default `shmcb:/var/run/apache2/ssl_scache`
|
||||
* `node['apache']['mod_ssl']['session_cache_timeout']` - Number of seconds before an SSL session expires in the Session Cache. Default 300.
|
||||
* `node['apache']['mod_ssl']['compression']` - Enable compression on the SSL level. Default 'Off'.
|
||||
* `node['apache']['mod_ssl']['use_stapling']` - Enable stapling of OCSP responses in the TLS handshake. Default 'Off'.
|
||||
* `node['apache']['mod_ssl']['stapling_responder_timeout']` - Timeout for OCSP stapling queries. Default 5
|
||||
* `node['apache']['mod_ssl']['stapling_return_responder_errors']` - Pass stapling related OCSP errors on to client. Default 'Off'
|
||||
* `node['apache']['mod_ssl']['stapling_cache']` - Configures the OCSP stapling cache. Default `shmcb:/var/run/ocsp(128000)`
|
||||
* `node['apache']['mod_ssl']['pass_phrase_dialog']` - Configures SSLPassPhraseDialog. Default `builtin`
|
||||
* `node['apache']['mod_ssl']['mutex']` - Configures SSLMutex. Default `file:/var/run/apache2/ssl_mutex`
|
||||
* `node['apache']['mod_ssl']['directives']` - Hash for add any custom directive.
|
||||
|
||||
For more information on these directives and how to best secure your site see
|
||||
- https://bettercrypto.org/
|
||||
- https://wiki.mozilla.org/Security/Server_Side_TLS
|
||||
- https://www.insecure.ws/linux/apache_ssl.html
|
||||
- https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/
|
||||
- https://istlsfastyet.com/
|
||||
- https://www.ssllabs.com/projects/best-practices/
|
||||
|
||||
Recipes
|
||||
=======
|
||||
|
||||
Most of the recipes in the cookbook are for enabling Apache modules.
|
||||
Where additional configuration or behavior is used, it is documented
|
||||
below in more detail.
|
||||
|
||||
The following recipes merely enable the specified module: `mod_alias`,
|
||||
`mod_auth_basic`, `mod_auth_digest`, `mod_authn_file`, `mod_authnz_ldap`,
|
||||
`mod_authz_default`, `mod_authz_groupfile`, `mod_authz_host`,
|
||||
`mod_authz_user`, `mod_autoindex`, `mod_cgi`, `mod_dav_fs`,
|
||||
`mod_dav_svn`, `mod_deflate`, `mod_dir`, `mod_env`, `mod_expires`,
|
||||
`mod_headers`, `mod_ldap`, `mod_log_config`, `mod_mime`,
|
||||
`mod_negotiation`, `mod_proxy`, `mod_proxy_ajp`, `mod_proxy_balancer`,
|
||||
`mod_proxy_connect`, `mod_proxy_http`, `mod_python`, `mod_rewrite`,
|
||||
`mod_setenvif`, `mod_status`, `mod_wsgi`, `mod_xsendfile`.
|
||||
|
||||
On RHEL Family distributions, certain modules ship with a config file
|
||||
with the package. The recipes here may delete those configuration
|
||||
files to ensure they don't conflict with the settings from the
|
||||
cookbook, which will use per-module configuration in
|
||||
`/etc/httpd/mods-enabled`.
|
||||
|
||||
default
|
||||
-------
|
||||
|
||||
The default recipe does a number of things to set up Apache HTTPd. It
|
||||
also includes a number of modules based on the attribute
|
||||
`node['apache']['default_modules']` as recipes.
|
||||
|
||||
mod\_auth\_cas
|
||||
--------------
|
||||
|
||||
This recipe installs the proper package and enables the `auth_cas`
|
||||
module. It can install from source or package. Package is the default,
|
||||
set the attribute `node['apache']['mod_auth_cas']['from_source']` to
|
||||
true to enable source installation. Modify the version to install by
|
||||
changing the attribute
|
||||
`node['apache']['mod_auth_cas']['source_revision']`. It is a version
|
||||
tag by default, but could be master, or another tag, or branch.
|
||||
|
||||
The module configuration is written out with the `CASCookiePath` set,
|
||||
otherwise an error loading the module may cause Apache to not start.
|
||||
|
||||
**Note**: This recipe does not work on EL 6 platforms unless
|
||||
epel-testing repository is enabled (outside the scope of this
|
||||
cookbook), or the package version 1.0.8.1-3.el6 or higher is otherwise
|
||||
available to the system due to this bug:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=708550
|
||||
|
||||
mod\_auth\_openid
|
||||
-----------------
|
||||
|
||||
**Changed via COOK-915**
|
||||
|
||||
This recipe compiles the module from source. In addition to
|
||||
`build-essential`, some other packages are included for installation
|
||||
like the GNU C++ compiler and development headers.
|
||||
|
||||
To use the module in your own cookbooks to authenticate systems using
|
||||
OpenIDs, specify an array of OpenIDs that are allowed to authenticate
|
||||
with the attribute `node['apache']['allowed_openids']`. Use the
|
||||
following in a vhost to protect with OpenID authentication:
|
||||
|
||||
AuthType OpenID require user <%= node['apache']['allowed_openids'].join(' ') %>
|
||||
AuthOpenIDDBLocation <%= node['apache']['mod_auth_openid']['dblocation'] %>
|
||||
|
||||
Change the DBLocation with the attribute as required; this file is in
|
||||
a different location than previous versions, see below. It should be a
|
||||
sane default for most platforms, though, see
|
||||
`attributes/mod_auth_openid.rb`.
|
||||
|
||||
### Changes from COOK-915:
|
||||
|
||||
* `AuthType OpenID` instead of `AuthOpenIDEnabled On`.
|
||||
* `require user` instead of `AuthOpenIDUserProgram`.
|
||||
* A bug(?) in `mod_auth_openid` causes it to segfault when attempting
|
||||
to update the database file if the containing directory is not
|
||||
writable by the HTTPD process owner (e.g., www-data), even if the
|
||||
file is writable. In order to not interfere with other settings from
|
||||
the default recipe in this cookbook, the db file is moved.
|
||||
|
||||
mod\_fastcgi
|
||||
------------
|
||||
|
||||
Install the fastcgi package and enable the module.
|
||||
|
||||
Only work on Debian/Ubuntu
|
||||
|
||||
mod\_fcgid
|
||||
----------
|
||||
|
||||
Installs the fcgi package and enables the module. Requires EPEL on
|
||||
RHEL family.
|
||||
|
||||
On RHEL family, this recipe will delete the fcgid.conf and on version
|
||||
6+, create the /var/run/httpd/mod_fcgid` directory, which prevents the
|
||||
emergency error:
|
||||
|
||||
[emerg] (2)No such file or directory: mod_fcgid: Can't create shared memory for size XX bytes
|
||||
|
||||
mod\_php5
|
||||
--------
|
||||
|
||||
Simply installs the appropriate package on Debian, Ubuntu and
|
||||
ArchLinux.
|
||||
|
||||
On Red Hat family distributions including Fedora, the php.conf that
|
||||
comes with the package is removed. On RHEL platforms less than v6, the
|
||||
`php53` package is used.
|
||||
|
||||
* `node['apache']['mod_php5']['install_method']` - default `package` can be overridden to avoid package installs.
|
||||
|
||||
mod\_ssl
|
||||
--------
|
||||
|
||||
Besides installing and enabling `mod_ssl`, this recipe will append
|
||||
port 443 to the `node['apache']['listen_ports']` attribute array and
|
||||
update the ports.conf.
|
||||
|
||||
Definitions
|
||||
===========
|
||||
|
||||
The cookbook provides a few definitions. At some point in the future
|
||||
these definitions may be refactored into lightweight resources and
|
||||
providers as suggested by
|
||||
[foodcritic rule FC015](http://acrmp.github.com/foodcritic/#FC015).
|
||||
|
||||
apache\_config
|
||||
------------
|
||||
|
||||
Sets up configuration file for Apache from a template. The
|
||||
template should be in the same cookbook where the definition is used. This is used by the `apache_conf` definition and is not often used directly.
|
||||
|
||||
It will use `a2enconf` and `a2disconf` to control the symlinking of configuration files between `conf-available` and `conf-enabled`.
|
||||
|
||||
Enable or disable an Apache config file in
|
||||
`#{node['apache']['dir']}/conf-available` by calling `a2enmod` or
|
||||
`a2dismod` to manage the symbolic link in
|
||||
`#{node['apache']['dir']}/conf-enabled`. These config files should be created in your cookbook, and placed on the system using `apache_conf`
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `name` - Name of the config enabled or disabled with the `a2enconf` or `a2disconf` scripts.
|
||||
* `source` - The location of a template file. The default `name.erb`.
|
||||
* `cookbook` - The cookbook in which the configuration template is located (if it is not located in the current cookbook). The default value is the current cookbook.
|
||||
* `enable` - Default true, which uses `a2enconf` to enable the config. If false, the config will be disabled with `a2disconf`.
|
||||
|
||||
### Examples:
|
||||
|
||||
Enable the example config.
|
||||
|
||||
``````
|
||||
apache_config 'example' do
|
||||
enable true
|
||||
end
|
||||
``````
|
||||
|
||||
Disable a module:
|
||||
|
||||
``````
|
||||
apache_config 'disabled_example' do
|
||||
enable false
|
||||
end
|
||||
``````
|
||||
|
||||
See the recipes directory for many more examples of `apache_config`.
|
||||
|
||||
apache\_conf
|
||||
------------
|
||||
|
||||
Writes conf files to the `conf-available` folder, and passes enabled values to `apache_config`.
|
||||
|
||||
This definition should generally be called over `apache_config`.
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `name` - Name of the config placed and enabled or disabled with the `a2enconf` or `a2disconf` scripts.
|
||||
* `enable` - Default true, which uses `a2enconf` to enable the config. If false, the config will be disabled with `a2disconf`.
|
||||
* `conf_path` - path to put the config in if you need to override the default `conf-available`.
|
||||
|
||||
### Examples:
|
||||
|
||||
Place and enable the example conf:
|
||||
|
||||
``````
|
||||
apache_conf 'example' do
|
||||
enable true
|
||||
end
|
||||
``````
|
||||
|
||||
Place and disable (or never enable to begin with) the example conf:
|
||||
|
||||
``````
|
||||
apache_conf 'example' do
|
||||
enable false
|
||||
end
|
||||
``````
|
||||
|
||||
Place the example conf, which has a different path than the default (conf-*):
|
||||
|
||||
``````
|
||||
apache_conf 'example' do
|
||||
conf_path '/random/example/path'
|
||||
enable false
|
||||
end
|
||||
``````
|
||||
|
||||
apache\_mod
|
||||
------------
|
||||
|
||||
Sets up configuration file for an Apache module from a template. The
|
||||
template should be in the same cookbook where the definition is used.
|
||||
This is used by the `apache_module` definition and is not often used
|
||||
directly.
|
||||
|
||||
This will use a template resource to write the module's configuration
|
||||
file in the `mods-available` under the Apache configuration directory
|
||||
(`node['apache']['dir']`). This is a platform-dependent location. See
|
||||
__apache\_module__.
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `name` - Name of the template. When used from the `apache_module`,
|
||||
it will use the same name as the module.
|
||||
|
||||
### Examples:
|
||||
|
||||
Create `#{node['apache']['dir']}/mods-available/alias.conf`.
|
||||
|
||||
``````
|
||||
apache_mod "alias"
|
||||
``````
|
||||
|
||||
apache\_module
|
||||
--------------
|
||||
|
||||
Enable or disable an Apache module in
|
||||
`#{node['apache']['dir']}/mods-available` by calling `a2enmod` or
|
||||
`a2dismod` to manage the symbolic link in
|
||||
`#{node['apache']['dir']}/mods-enabled`. If the module has a
|
||||
configuration file, a template should be created in the cookbook where
|
||||
the definition is used. See __Examples__.
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `name` - Name of the module enabled or disabled with the `a2enmod` or `a2dismod` scripts.
|
||||
* `identifier` - String to identify the module for the `LoadModule` directive. Not typically needed, defaults to `#{name}_module`
|
||||
* `enable` - Default true, which uses `a2enmod` to enable the module. If false, the module will be disabled with `a2dismod`.
|
||||
* `conf` - Default false. Set to true if the module has a config file, which will use `apache_mod` for the file.
|
||||
* `filename` - specify the full name of the file, e.g.
|
||||
|
||||
### Examples:
|
||||
|
||||
Enable the ssl module, which also has a configuration template in `templates/default/mods/ssl.conf.erb`.
|
||||
|
||||
``````
|
||||
apache_module "ssl" do
|
||||
conf true
|
||||
end
|
||||
``````
|
||||
|
||||
Enable the php5 module, which has a different filename than the module default:
|
||||
|
||||
``````
|
||||
apache_module "php5" do
|
||||
filename "libphp5.so"
|
||||
end
|
||||
``````
|
||||
|
||||
Disable a module:
|
||||
|
||||
``````
|
||||
apache_module "disabled_module" do
|
||||
enable false
|
||||
end
|
||||
``````
|
||||
|
||||
See the recipes directory for many more examples of `apache_module`.
|
||||
|
||||
apache\_site
|
||||
------------
|
||||
|
||||
Enable or disable a VirtualHost in
|
||||
`#{node['apache']['dir']}/sites-available` by calling a2ensite or
|
||||
a2dissite to manage the symbolic link in
|
||||
`#{node['apache']['dir']}/sites-enabled`.
|
||||
|
||||
The template for the site must be managed as a separate resource. To
|
||||
combine the template with enabling a site, see `web_app`.
|
||||
|
||||
### Parameters:
|
||||
|
||||
* `name` - Name of the site.
|
||||
* `enable` - Default true, which uses `a2ensite` to enable the site. If false, the site will be disabled with `a2dissite`.
|
||||
|
||||
web\_app
|
||||
--------
|
||||
|
||||
Manage a template resource for a VirtualHost site, and enable it with
|
||||
`apache_site`. This is commonly done for managing web applications
|
||||
such as Ruby on Rails, PHP or Django, and the default behavior
|
||||
reflects that. However it is flexible.
|
||||
|
||||
This definition includes some recipes to make sure the system is
|
||||
configured to have Apache and some sane default modules:
|
||||
|
||||
* `apache2`
|
||||
* `apache2::mod_rewrite`
|
||||
* `apache2::mod_deflate`
|
||||
* `apache2::mod_headers`
|
||||
|
||||
It will then configure the template (see __Parameters__ and
|
||||
__Examples__ below), and enable or disable the site per the `enable`
|
||||
parameter.
|
||||
|
||||
### Parameters:
|
||||
|
||||
Current parameters used by the definition:
|
||||
|
||||
* `name` - The name of the site. The template will be written to
|
||||
`#{node['apache']['dir']}/sites-available/#{params['name']}.conf`
|
||||
* `cookbook` - Optional. Cookbook where the source template is. If
|
||||
this is not defined, Chef will use the named template in the
|
||||
cookbook where the definition is used.
|
||||
* `template` - Default `web_app.conf.erb`, source template file.
|
||||
* `enable` - Default true. Passed to the `apache_site` definition.
|
||||
|
||||
Additional parameters can be defined when the definition is called in
|
||||
a recipe, see __Examples__.
|
||||
|
||||
### Examples:
|
||||
|
||||
The recommended way to use the `web_app` definition is in a application specific cookbook named "my_app".
|
||||
The following example would look for a template named 'web_app.conf.erb' in your cookbook containing
|
||||
the apache httpd directives defining the `VirtualHost` that would serve up "my_app".
|
||||
|
||||
``````
|
||||
web_app "my_app" do
|
||||
template 'web_app.conf.erb'
|
||||
server_name node['my_app']['hostname']
|
||||
end
|
||||
``````
|
||||
|
||||
All parameters are passed into the template. You can use whatever you
|
||||
like. The apache2 cookbook comes with a `web_app.conf.erb` template as
|
||||
an example. The following parameters are used in the template:
|
||||
|
||||
* `server_name` - ServerName directive.
|
||||
* `server_aliases` - ServerAlias directive. Must be an array of aliases.
|
||||
* `docroot` - DocumentRoot directive.
|
||||
* `application_name` - Used in RewriteLog directive. Will be set to the `name` parameter.
|
||||
* `directory_index` - Allow overriding the default DirectoryIndex setting, optional
|
||||
* `directory_options` - Override Options on the docroot, for example to add parameters like Includes or Indexes, optional.
|
||||
* `allow_override` - Modify the AllowOverride directive on the docroot to support apps that need .htaccess to modify configuration or require authentication.
|
||||
|
||||
To use the default web_app, for example:
|
||||
|
||||
``````
|
||||
web_app "my_site" do
|
||||
server_name node['hostname']
|
||||
server_aliases [node['fqdn'], "my-site.example.com"]
|
||||
docroot "/srv/www/my_site"
|
||||
cookbook 'apache2'
|
||||
end
|
||||
``````
|
||||
|
||||
The parameters specified will be used as:
|
||||
|
||||
* `@params[:server_name]`
|
||||
* `@params[:server_aliases]`
|
||||
* `@params[:docroot]`
|
||||
|
||||
In the template. When you write your own, the `@` is significant.
|
||||
|
||||
For more information about Definitions and parameters, see the
|
||||
[Chef Wiki](http://docs.chef.io/definitions.html)
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Using this cookbook is relatively straightforward. Add the desired
|
||||
recipes to the run list of a node, or create a role. Depending on your
|
||||
environment, you may have multiple roles that use different recipes
|
||||
from this cookbook. Adjust any attributes as desired. For example, to
|
||||
create a basic role for web servers that provide both HTTP and HTTPS:
|
||||
|
||||
``````
|
||||
% cat roles/webserver.rb
|
||||
name "webserver"
|
||||
description "Systems that serve HTTP and HTTPS"
|
||||
run_list(
|
||||
"recipe[apache2]",
|
||||
"recipe[apache2::mod_ssl]"
|
||||
)
|
||||
default_attributes(
|
||||
"apache" => {
|
||||
"listen_ports" => ["80", "443"]
|
||||
}
|
||||
)
|
||||
``````
|
||||
|
||||
For examples of using the definitions in your own recipes, see their
|
||||
respective sections above.
|
||||
|
||||
License and Authors
|
||||
===================
|
||||
|
||||
* Author:: Adam Jacob <adam@chef.io>
|
||||
* Author:: Joshua Timberman <joshua@chef.io>
|
||||
* Author:: Bryan McLellan <bryanm@widemile.com>
|
||||
* Author:: Dave Esposito <esposito@espolinux.corpnet.local>
|
||||
* Author:: David Abdemoulaie <github@hobodave.com>
|
||||
* Author:: Edmund Haselwanter <edmund@haselwanter.com>
|
||||
* Author:: Eric Rochester <err8n@virginia.edu>
|
||||
* Author:: Jim Browne <jbrowne@42lines.net>
|
||||
* Author:: Matthew Kent <mkent@magoazul.com>
|
||||
* Author:: Nathen Harvey <nharvey@customink.com>
|
||||
* Author:: Ringo De Smet <ringo.de.smet@amplidata.com>
|
||||
* Author:: Sean OMeara <someara@chef.io>
|
||||
* Author:: Seth Chisamore <schisamo@chef.io>
|
||||
* Author:: Gilles Devaux <gilles@peerpong.com>
|
||||
* Author:: Sander van Zoest <sander+cookbooks@vanzoest.com>
|
||||
* Author:: Taylor Price <tayworm@gmail.com>
|
||||
|
||||
* Copyright:: 2009-2012, Chef Software, Inc
|
||||
* Copyright:: 2011, Atriso
|
||||
* Copyright:: 2011, CustomInk, LLC.
|
||||
* Copyright:: 2013-2014, OneHealth Solutions, Inc.
|
||||
* Copyright:: 2014, Viverae, 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.
|
|
@ -0,0 +1,354 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: default
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
default['apache']['mpm'] =
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
case node['platform']
|
||||
when 'ubuntu'
|
||||
if node['platform_version'].to_f >= 14.04
|
||||
'event'
|
||||
elsif node['platform_version'].to_f >= 12.04
|
||||
'worker'
|
||||
else
|
||||
'prefork'
|
||||
end
|
||||
when 'debian'
|
||||
node['platform_version'].to_f >= 7.0 ? 'worker' : 'prefork'
|
||||
when 'linuxmint'
|
||||
node['platform_version'].to_i >= 17 ? 'event' : 'prefork'
|
||||
else
|
||||
'prefork'
|
||||
end
|
||||
else
|
||||
'prefork'
|
||||
end
|
||||
|
||||
default['apache']['version'] =
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
case node['platform']
|
||||
when 'ubuntu'
|
||||
node['platform_version'].to_f >= 13.10 ? '2.4' : '2.2'
|
||||
when 'linuxmint'
|
||||
node['platform_version'].to_i >= 16 ? '2.4' : '2.2'
|
||||
when 'debian', 'raspbian'
|
||||
node['platform_version'].to_f >= 8.0 ? '2.4' : '2.2'
|
||||
else
|
||||
'2.4'
|
||||
end
|
||||
when 'rhel'
|
||||
case node['platform']
|
||||
when 'amazon'
|
||||
node['platform_version'].to_f >= 2013.09 ? '2.4' : '2.2'
|
||||
else
|
||||
node['platform_version'].to_f >= 7.0 ? '2.4' : '2.2'
|
||||
end
|
||||
when 'fedora'
|
||||
node['platform_version'].to_f >= 18 ? '2.4' : '2.2'
|
||||
when 'suse'
|
||||
case node['platform']
|
||||
when 'opensuse'
|
||||
node['platform_version'].to_f >= 13.1 ? '2.4' : '2.2'
|
||||
# FIXME: when "suse" for SLES
|
||||
else
|
||||
'2.4'
|
||||
end
|
||||
when 'freebsd'
|
||||
node['platform_version'].to_f >= 10.0 ? '2.4' : '2.2'
|
||||
else
|
||||
'2.4'
|
||||
end
|
||||
|
||||
default['apache']['root_group'] = 'root'
|
||||
default['apache']['default_site_name'] = 'default'
|
||||
|
||||
# Where the various parts of apache are
|
||||
case node['platform']
|
||||
when 'redhat', 'centos', 'scientific', 'fedora', 'amazon', 'oracle'
|
||||
default['apache']['package'] = 'httpd'
|
||||
default['apache']['service_name'] = 'httpd'
|
||||
default['apache']['devel_package'] = 'httpd-devel'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
default['apache']['apachectl'] = '/usr/sbin/apachectl'
|
||||
default['apache']['dir'] = '/etc/httpd'
|
||||
default['apache']['log_dir'] = '/var/log/httpd'
|
||||
default['apache']['error_log'] = 'error.log'
|
||||
default['apache']['access_log'] = 'access.log'
|
||||
default['apache']['user'] = 'apache'
|
||||
default['apache']['group'] = 'apache'
|
||||
default['apache']['binary'] = '/usr/sbin/httpd'
|
||||
default['apache']['conf_dir'] = '/etc/httpd/conf'
|
||||
default['apache']['docroot_dir'] = '/var/www/html'
|
||||
default['apache']['cgibin_dir'] = '/var/www/cgi-bin'
|
||||
if node['apache']['version'] == '2.4'
|
||||
default['apache']['icondir'] = '/usr/share/httpd/icons'
|
||||
else
|
||||
default['apache']['icondir'] = '/var/www/icons'
|
||||
end
|
||||
default['apache']['cache_dir'] = '/var/cache/httpd'
|
||||
default['apache']['run_dir'] = '/var/run/httpd'
|
||||
default['apache']['lock_dir'] = '/var/run/httpd'
|
||||
if node['platform'] == 'amazon' && node['apache']['version'] == '2.4'
|
||||
default['apache']['package'] = 'httpd24'
|
||||
default['apache']['devel_package'] = 'httpd24-devel'
|
||||
end
|
||||
if node['platform_version'].to_f >= 6
|
||||
default['apache']['pid_file'] = '/var/run/httpd/httpd.pid'
|
||||
else
|
||||
default['apache']['pid_file'] = '/var/run/httpd.pid'
|
||||
end
|
||||
default['apache']['lib_dir'] = node['kernel']['machine'] =~ /^i[36]86$/ ? '/usr/lib/httpd' : '/usr/lib64/httpd'
|
||||
default['apache']['libexec_dir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
when 'suse', 'opensuse'
|
||||
default['apache']['package'] = 'apache2'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
default['apache']['devel_package'] = 'httpd-devel'
|
||||
default['apache']['apachectl'] = '/usr/sbin/apache2ctl'
|
||||
default['apache']['dir'] = '/etc/apache2'
|
||||
default['apache']['log_dir'] = '/var/log/apache2'
|
||||
default['apache']['error_log'] = 'error.log'
|
||||
default['apache']['access_log'] = 'access.log'
|
||||
default['apache']['user'] = 'wwwrun'
|
||||
default['apache']['group'] = 'www'
|
||||
default['apache']['binary'] = '/usr/sbin/httpd2'
|
||||
default['apache']['conf_dir'] = '/etc/apache2'
|
||||
default['apache']['docroot_dir'] = '/srv/www/htdocs'
|
||||
default['apache']['cgibin_dir'] = '/srv/www/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/share/apache2/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/apache2'
|
||||
default['apache']['run_dir'] = '/var/run/httpd'
|
||||
default['apache']['lock_dir'] = '/var/run/httpd'
|
||||
if node['platform_version'].to_f >= 6
|
||||
default['apache']['pid_file'] = '/var/run/httpd/httpd.pid'
|
||||
else
|
||||
default['apache']['pid_file'] = '/var/run/httpd.pid'
|
||||
end
|
||||
default['apache']['lib_dir'] = node['kernel']['machine'] =~ /^i[36]86$/ ? '/usr/lib/apache2' : '/usr/lib64/apache2'
|
||||
default['apache']['libexec_dir'] = node['apache']['lib_dir']
|
||||
when 'debian', 'ubuntu'
|
||||
default['apache']['package'] = 'apache2'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
if node['apache']['mpm'] == 'prefork'
|
||||
default['apache']['devel_package'] = 'apache2-prefork-dev'
|
||||
else
|
||||
default['apache']['devel_package'] = 'apache2-dev'
|
||||
end
|
||||
default['apache']['apachectl'] = '/usr/sbin/apache2ctl'
|
||||
default['apache']['dir'] = '/etc/apache2'
|
||||
default['apache']['log_dir'] = '/var/log/apache2'
|
||||
default['apache']['error_log'] = 'error.log'
|
||||
default['apache']['access_log'] = 'access.log'
|
||||
default['apache']['user'] = 'www-data'
|
||||
default['apache']['group'] = 'www-data'
|
||||
default['apache']['binary'] = '/usr/sbin/apache2'
|
||||
default['apache']['conf_dir'] = '/etc/apache2'
|
||||
default['apache']['cgibin_dir'] = '/usr/lib/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/share/apache2/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/apache2'
|
||||
default['apache']['run_dir'] = '/var/run/apache2'
|
||||
default['apache']['lock_dir'] = '/var/lock/apache2'
|
||||
# this should use COOK-3917 to educate the initscript of the pid location
|
||||
if node['apache']['version'] == '2.4'
|
||||
default['apache']['pid_file'] = '/var/run/apache2/apache2.pid'
|
||||
default['apache']['docroot_dir'] = '/var/www/html'
|
||||
else
|
||||
default['apache']['pid_file'] = '/var/run/apache2.pid'
|
||||
default['apache']['docroot_dir'] = '/var/www'
|
||||
end
|
||||
default['apache']['lib_dir'] = '/usr/lib/apache2'
|
||||
default['apache']['build_dir'] = '/usr/share/apache2'
|
||||
default['apache']['libexec_dir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
default['apache']['default_site_name'] = '000-default'
|
||||
when 'arch'
|
||||
default['apache']['package'] = 'apache'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
# default['apache']['apachectl'] = '/usr/sbin/apachectl'
|
||||
default['apache']['dir'] = '/etc/httpd'
|
||||
default['apache']['log_dir'] = '/var/log/httpd'
|
||||
default['apache']['error_log'] = 'error.log'
|
||||
default['apache']['access_log'] = 'access.log'
|
||||
default['apache']['user'] = 'http'
|
||||
default['apache']['group'] = 'http'
|
||||
default['apache']['binary'] = '/usr/sbin/httpd'
|
||||
default['apache']['conf_dir'] = '/etc/httpd'
|
||||
default['apache']['docroot_dir'] = '/srv/http'
|
||||
default['apache']['cgibin_dir'] = '/usr/share/httpd/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/share/httpd/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/httpd'
|
||||
default['apache']['run_dir'] = '/var/run/httpd'
|
||||
default['apache']['lock_dir'] = '/var/run/httpd'
|
||||
default['apache']['pid_file'] = '/var/run/httpd/httpd.pid'
|
||||
default['apache']['lib_dir'] = '/usr/lib/httpd'
|
||||
default['apache']['libexec_dir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
when 'freebsd'
|
||||
if node['apache']['version'] == '2.4'
|
||||
default['apache']['package'] = 'apache24'
|
||||
default['apache']['dir'] = '/usr/local/etc/apache24'
|
||||
default['apache']['conf_dir'] = '/usr/local/etc/apache24'
|
||||
default['apache']['docroot_dir'] = '/usr/local/www/apache24/data'
|
||||
default['apache']['cgibin_dir'] = '/usr/local/www/apache24/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/local/www/apache24/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/apache24'
|
||||
default['apache']['run_dir'] = '/var/run'
|
||||
default['apache']['lock_dir'] = '/var/run'
|
||||
default['apache']['lib_dir'] = '/usr/local/libexec/apache24'
|
||||
else
|
||||
default['apache']['package'] = 'apache22'
|
||||
default['apache']['dir'] = '/usr/local/etc/apache22'
|
||||
default['apache']['conf_dir'] = '/usr/local/etc/apache22'
|
||||
default['apache']['docroot_dir'] = '/usr/local/www/apache22/data'
|
||||
default['apache']['cgibin_dir'] = '/usr/local/www/apache22/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/local/www/apache22/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/apache22'
|
||||
default['apache']['run_dir'] = '/var/run'
|
||||
default['apache']['lock_dir'] = '/var/run'
|
||||
default['apache']['lib_dir'] = '/usr/local/libexec/apache22'
|
||||
end
|
||||
default['apache']['devel_package'] = 'httpd-devel'
|
||||
default['apache']['perl_pkg'] = 'perl5'
|
||||
default['apache']['apachectl'] = '/usr/local/sbin/apachectl'
|
||||
default['apache']['pid_file'] = '/var/run/httpd.pid'
|
||||
default['apache']['log_dir'] = '/var/log'
|
||||
default['apache']['error_log'] = 'httpd-error.log'
|
||||
default['apache']['access_log'] = 'httpd-access.log'
|
||||
default['apache']['root_group'] = 'wheel'
|
||||
default['apache']['user'] = 'www'
|
||||
default['apache']['group'] = 'www'
|
||||
default['apache']['binary'] = '/usr/local/sbin/httpd'
|
||||
default['apache']['libexec_dir'] = node['apache']['lib_dir']
|
||||
else
|
||||
default['apache']['package'] = 'apache2'
|
||||
default['apache']['devel_package'] = 'apache2-dev'
|
||||
default['apache']['perl_pkg'] = 'perl'
|
||||
default['apache']['dir'] = '/etc/apache2'
|
||||
default['apache']['log_dir'] = '/var/log/apache2'
|
||||
default['apache']['error_log'] = 'error.log'
|
||||
default['apache']['access_log'] = 'access.log'
|
||||
default['apache']['user'] = 'www-data'
|
||||
default['apache']['group'] = 'www-data'
|
||||
default['apache']['binary'] = '/usr/sbin/apache2'
|
||||
default['apache']['conf_dir'] = '/etc/apache2'
|
||||
default['apache']['docroot_dir'] = '/var/www'
|
||||
default['apache']['cgibin_dir'] = '/usr/lib/cgi-bin'
|
||||
default['apache']['icondir'] = '/usr/share/apache2/icons'
|
||||
default['apache']['cache_dir'] = '/var/cache/apache2'
|
||||
default['apache']['run_dir'] = 'logs'
|
||||
default['apache']['lock_dir'] = 'logs'
|
||||
default['apache']['pid_file'] = 'logs/httpd.pid'
|
||||
default['apache']['lib_dir'] = '/usr/lib/apache2'
|
||||
default['apache']['libexec_dir'] = "#{node['apache']['lib_dir']}/modules"
|
||||
end
|
||||
|
||||
###
|
||||
# These settings need the unless, since we want them to be tunable,
|
||||
# and we don't want to override the tunings.
|
||||
###
|
||||
|
||||
# General settings
|
||||
if node['apache']['service_name'].nil?
|
||||
default['apache']['service_name'] = node['apache']['package']
|
||||
end
|
||||
default['apache']['listen_addresses'] = %w(*)
|
||||
default['apache']['listen_ports'] = %w(80)
|
||||
default['apache']['contact'] = 'ops@example.com'
|
||||
default['apache']['timeout'] = 300
|
||||
default['apache']['keepalive'] = 'On'
|
||||
default['apache']['keepaliverequests'] = 100
|
||||
default['apache']['keepalivetimeout'] = 5
|
||||
default['apache']['locale'] = 'C'
|
||||
default['apache']['sysconfig_additional_params'] = {}
|
||||
default['apache']['default_site_enabled'] = false
|
||||
default['apache']['default_site_port'] = '80'
|
||||
default['apache']['access_file_name'] = '.htaccess'
|
||||
|
||||
# Security
|
||||
default['apache']['servertokens'] = 'Prod'
|
||||
default['apache']['serversignature'] = 'On'
|
||||
default['apache']['traceenable'] = 'Off'
|
||||
|
||||
# mod_auth_openids
|
||||
default['apache']['allowed_openids'] = []
|
||||
|
||||
# mod_status Allow list, space seprated list of allowed entries.
|
||||
default['apache']['status_allow_list'] = '127.0.0.1 ::1'
|
||||
|
||||
# mod_status ExtendedStatus, set to 'true' to enable
|
||||
default['apache']['ext_status'] = false
|
||||
|
||||
# mod_info Allow list, space seprated list of allowed entries.
|
||||
default['apache']['info_allow_list'] = '127.0.0.1 ::1'
|
||||
|
||||
# Supported mpm list
|
||||
default['apache']['mpm_support'] = %w(prefork worker event)
|
||||
|
||||
# Prefork Attributes
|
||||
default['apache']['prefork']['startservers'] = 16
|
||||
default['apache']['prefork']['minspareservers'] = 16
|
||||
default['apache']['prefork']['maxspareservers'] = 32
|
||||
default['apache']['prefork']['serverlimit'] = 256
|
||||
default['apache']['prefork']['maxrequestworkers'] = 256
|
||||
default['apache']['prefork']['maxconnectionsperchild'] = 10_000
|
||||
|
||||
# Worker Attributes
|
||||
default['apache']['worker']['startservers'] = 4
|
||||
default['apache']['worker']['serverlimit'] = 16
|
||||
default['apache']['worker']['minsparethreads'] = 64
|
||||
default['apache']['worker']['maxsparethreads'] = 192
|
||||
default['apache']['worker']['threadlimit'] = 192
|
||||
default['apache']['worker']['threadsperchild'] = 64
|
||||
default['apache']['worker']['maxrequestworkers'] = 1024
|
||||
default['apache']['worker']['maxconnectionsperchild'] = 0
|
||||
|
||||
# Event Attributes
|
||||
default['apache']['event']['startservers'] = 4
|
||||
default['apache']['event']['serverlimit'] = 16
|
||||
default['apache']['event']['minsparethreads'] = 64
|
||||
default['apache']['event']['maxsparethreads'] = 192
|
||||
default['apache']['event']['threadlimit'] = 192
|
||||
default['apache']['event']['threadsperchild'] = 64
|
||||
default['apache']['event']['maxrequestworkers'] = 1024
|
||||
default['apache']['event']['maxconnectionsperchild'] = 0
|
||||
|
||||
# mod_proxy settings
|
||||
default['apache']['proxy']['require'] = 'all denied'
|
||||
default['apache']['proxy']['order'] = 'deny,allow'
|
||||
default['apache']['proxy']['deny_from'] = 'all'
|
||||
default['apache']['proxy']['allow_from'] = 'none'
|
||||
|
||||
# Default modules to enable via include_recipe
|
||||
default['apache']['default_modules'] = %w(
|
||||
status alias auth_basic authn_core authn_file authz_core authz_groupfile
|
||||
authz_host authz_user autoindex dir env mime negotiation setenvif
|
||||
)
|
||||
|
||||
%w(log_config logio).each do |log_mod|
|
||||
default['apache']['default_modules'] << log_mod if %w(rhel fedora suse arch freebsd).include?(node['platform_family'])
|
||||
end
|
||||
|
||||
if node['apache']['version'] == '2.4'
|
||||
%w(unixd).each do |unix_mod|
|
||||
default['apache']['default_modules'] << unix_mod if %w(rhel fedora suse arch freebsd).include?(node['platform_family'])
|
||||
end
|
||||
|
||||
unless node['platform'] == 'amazon'
|
||||
default['apache']['default_modules'] << 'systemd' if %w(rhel fedora).include?(node['platform_family'])
|
||||
end
|
||||
end
|
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: 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.
|
||||
#
|
||||
|
||||
default['apache']['mod_auth_cas']['from_source'] = false
|
||||
default['apache']['mod_auth_cas']['source_revision'] = 'v1.0.8.1'
|
|
@ -0,0 +1,34 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: 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.
|
||||
#
|
||||
|
||||
default['apache']['mod_auth_openid']['ref'] = 'v0.8'
|
||||
default['apache']['mod_auth_openid']['version'] = '0.8'
|
||||
default['apache']['mod_auth_openid']['source_url'] = "https://github.com/bmuller/mod_auth_openid/archive/#{node['apache']['mod_auth_openid']['ref']}.tar.gz"
|
||||
default['apache']['mod_auth_openid']['cache_dir'] = '/var/cache/mod_auth_openid'
|
||||
default['apache']['mod_auth_openid']['dblocation'] = "#{node['apache']['mod_auth_openid']['cache_dir']}/mod_auth_openid.db"
|
||||
|
||||
case node['platform_family']
|
||||
when 'freebsd'
|
||||
default['apache']['mod_auth_openid']['configure_flags'] = [
|
||||
'CPPFLAGS=-I/usr/local/include',
|
||||
'LDFLAGS=-I/usr/local/lib -lsqlite3'
|
||||
]
|
||||
else
|
||||
default['apache']['mod_auth_openid']['configure_flags'] = []
|
||||
end
|
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: mod_fastcgi
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
default['apache']['mod_fastcgi']['download_url'] = 'http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz'
|
||||
default['apache']['mod_fastcgi']['install_method'] = 'package'
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: 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.
|
||||
#
|
||||
|
||||
default['apache2']['mod_pagespeed']['package_link'] =
|
||||
if node['kernel']['machine'] =~ /^i[36']86$/
|
||||
'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_i386.deb'
|
||||
else
|
||||
'https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-stable_current_amd64.deb'
|
||||
end
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: mod_php5
|
||||
#
|
||||
# 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.
|
||||
|
||||
default['apache']['mod_php5']['install_method'] = 'package'
|
||||
default['apache']['mod_php5']['so_filename'] = 'libphp5.so'
|
||||
|
||||
if node['platform'] == 'amazon' && node['apache']['version'] == '2.4'
|
||||
default['apache']['mod_php5']['so_filename'] = 'libphp.so'
|
||||
end
|
|
@ -0,0 +1,59 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Attributes:: mod_ssl
|
||||
#
|
||||
# Copyright 2012-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.
|
||||
#
|
||||
|
||||
default['apache']['mod_ssl']['port'] = 443
|
||||
default['apache']['mod_ssl']['protocol'] = 'All -SSLv2 -SSLv3'
|
||||
default['apache']['mod_ssl']['cipher_suite'] = 'EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:RC4!aNULL!eNULL!LOW!3DES!MD5!EXP!PSK!SRP!DSS'
|
||||
default['apache']['mod_ssl']['honor_cipher_order'] = 'On'
|
||||
default['apache']['mod_ssl']['insecure_renegotiation'] = 'Off'
|
||||
default['apache']['mod_ssl']['strict_sni_vhost_check'] = 'Off'
|
||||
default['apache']['mod_ssl']['session_cache'] = 'shmcb:/var/run/apache2/ssl_scache'
|
||||
default['apache']['mod_ssl']['session_cache_timeout'] = 300
|
||||
default['apache']['mod_ssl']['compression'] = 'Off'
|
||||
default['apache']['mod_ssl']['use_stapling'] = 'Off'
|
||||
default['apache']['mod_ssl']['stapling_responder_timeout'] = 5
|
||||
default['apache']['mod_ssl']['stapling_return_responder_errors'] = 'Off'
|
||||
default['apache']['mod_ssl']['stapling_cache'] = 'shmcb:/var/run/ocsp(128000)'
|
||||
default['apache']['mod_ssl']['pass_phrase_dialog'] = 'builtin'
|
||||
default['apache']['mod_ssl']['mutex'] = 'file:/var/run/apache2/ssl_mutex'
|
||||
default['apache']['mod_ssl']['directives'] = {}
|
||||
default['apache']['mod_ssl']['pkg_name'] = 'mod_ssl'
|
||||
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
case node['platform']
|
||||
when 'ubuntu'
|
||||
if node['apache']['version'] == '2.4'
|
||||
default['apache']['mod_ssl']['pass_phrase_dialog'] = 'exec:/usr/share/apache2/ask-for-passphrase'
|
||||
end
|
||||
end
|
||||
when 'freebsd'
|
||||
default['apache']['mod_ssl']['session_cache'] = 'shmcb:/var/run/ssl_scache(512000)'
|
||||
default['apache']['mod_ssl']['mutex'] = 'file:/var/run/ssl_mutex'
|
||||
when 'rhel', 'fedora', 'suse'
|
||||
case node['platform']
|
||||
when 'amazon'
|
||||
if node['apache']['version'] == '2.4'
|
||||
default['apache']['mod_ssl']['pkg_name'] = 'mod24_ssl'
|
||||
end
|
||||
end
|
||||
default['apache']['mod_ssl']['session_cache'] = 'shmcb:/var/cache/mod_ssl/scache(512000)'
|
||||
default['apache']['mod_ssl']['mutex'] = 'default'
|
||||
end
|
|
@ -0,0 +1,45 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Definition:: apache_conf
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
define :apache_conf, :enable => true do
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
conf_name = "#{params[:name]}.conf"
|
||||
params[:conf_path] = params[:conf_path] || "#{node['apache']['dir']}/conf-available"
|
||||
|
||||
file "#{params[:conf_path]}/#{params[:name]}" do
|
||||
action :delete
|
||||
end
|
||||
|
||||
template "#{params[:conf_path]}/#{conf_name}" do
|
||||
source params[:source] || "#{conf_name}.erb"
|
||||
cookbook params[:cookbook] if params[:cookbook]
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
backup false
|
||||
mode '0644'
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
end
|
||||
|
||||
if params[:enable]
|
||||
apache_config params[:name] do
|
||||
enable true
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,42 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Definition:: apache_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.
|
||||
#
|
||||
|
||||
define :apache_config, :enable => true do
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
conf_name = "#{params[:name]}.conf"
|
||||
params[:conf_path] = params[:conf_path] || "#{node['apache']['dir']}/conf-available"
|
||||
|
||||
if params[:enable]
|
||||
execute "a2enconf #{conf_name}" do
|
||||
command "/usr/sbin/a2enconf #{conf_name}"
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
not_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/conf-enabled/#{conf_name}") &&
|
||||
(::File.exist?(params[:conf_path]) ? ::File.symlink?("#{node['apache']['dir']}/conf-enabled/#{conf_name}") : true)
|
||||
end
|
||||
end
|
||||
else
|
||||
execute "a2disconf #{conf_name}" do
|
||||
command "/usr/sbin/a2disconf #{conf_name}"
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
only_if { ::File.symlink?("#{node['apache']['dir']}/conf-enabled/#{conf_name}") }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,28 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Definition:: apache_mod
|
||||
#
|
||||
# Copyright 2008-20013, 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.
|
||||
#
|
||||
|
||||
define :apache_mod do
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
template "#{node['apache']['dir']}/mods-available/#{params[:name]}.conf" do
|
||||
source "mods/#{params[:name]}.conf.erb"
|
||||
mode '0644'
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
end
|
||||
end
|
|
@ -0,0 +1,58 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Definition:: apache_module
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
define :apache_module, :enable => true, :conf => false, :restart => false do
|
||||
include_recipe 'apache2::default'
|
||||
|
||||
params[:filename] = params[:filename] || "mod_#{params[:name]}.so"
|
||||
params[:module_path] = params[:module_path] || "#{node['apache']['libexec_dir']}/#{params[:filename]}"
|
||||
params[:identifier] = params[:identifier] || "#{params[:name]}_module"
|
||||
|
||||
apache_mod params[:name] if params[:conf]
|
||||
|
||||
file "#{node['apache']['dir']}/mods-available/#{params[:name]}.load" do
|
||||
content "LoadModule #{params[:identifier]} #{params[:module_path]}\n"
|
||||
mode '0644'
|
||||
end
|
||||
|
||||
if params[:enable]
|
||||
execute "a2enmod #{params[:name]}" do
|
||||
command "/usr/sbin/a2enmod #{params[:name]}"
|
||||
if params[:restart]
|
||||
notifies :restart, 'service[apache2]', :delayed
|
||||
else
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
end
|
||||
not_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") &&
|
||||
(::File.exist?("#{node['apache']['dir']}/mods-available/#{params[:name]}.conf") ? ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.conf") : true)
|
||||
end
|
||||
end
|
||||
else
|
||||
execute "a2dismod #{params[:name]}" do
|
||||
command "/usr/sbin/a2dismod #{params[:name]}"
|
||||
if params[:restart]
|
||||
notifies :restart, 'service[apache2]', :delayed
|
||||
else
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
end
|
||||
only_if { ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,44 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Definition:: apache_site
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
define :apache_site, :enable => true do
|
||||
include_recipe 'apache2::default'
|
||||
conf_name = "#{params[:name]}.conf"
|
||||
|
||||
if params[:enable]
|
||||
execute "a2ensite #{conf_name}" do
|
||||
command "/usr/sbin/a2ensite #{conf_name}"
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
not_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/#{conf_name}") ||
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/000-#{conf_name}")
|
||||
end
|
||||
only_if { ::File.exist?("#{node['apache']['dir']}/sites-available/#{conf_name}") }
|
||||
end
|
||||
else
|
||||
execute "a2dissite #{conf_name}" do
|
||||
command "/usr/sbin/a2dissite #{conf_name}"
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
only_if do
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/#{conf_name}") ||
|
||||
::File.symlink?("#{node['apache']['dir']}/sites-enabled/000-#{conf_name}")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,48 @@
|
|||
#
|
||||
# Cookbook Name:: apache2
|
||||
# Definition:: web_app
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
define :web_app, :template => 'web_app.conf.erb', :local => false, :enable => true do
|
||||
application_name = params[:name]
|
||||
|
||||
include_recipe 'apache2::default'
|
||||
include_recipe 'apache2::mod_rewrite'
|
||||
include_recipe 'apache2::mod_deflate'
|
||||
include_recipe 'apache2::mod_headers'
|
||||
|
||||
template "#{node['apache']['dir']}/sites-available/#{application_name}.conf" do
|
||||
source params[:template]
|
||||
local params[:local]
|
||||
owner 'root'
|
||||
group node['apache']['root_group']
|
||||
mode '0644'
|
||||
cookbook params[:cookbook] if params[:cookbook]
|
||||
variables(
|
||||
:application_name => application_name,
|
||||
:params => params
|
||||
)
|
||||
if ::File.exist?("#{node['apache']['dir']}/sites-enabled/#{application_name}.conf")
|
||||
notifies :reload, 'service[apache2]', :delayed
|
||||
end
|
||||
end
|
||||
|
||||
site_enabled = params[:enable]
|
||||
apache_site params[:name] do
|
||||
enable site_enabled
|
||||
end
|
||||
end
|
|
@ -0,0 +1,41 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
=begin
|
||||
|
||||
Generates Ubuntu style module.load files.
|
||||
|
||||
./apache2_module_conf_generate.pl /usr/lib64/httpd/modules /etc/httpd/mods-available
|
||||
|
||||
ARGV[0] is the apache modules directory, ARGV[1] is where you want 'em.
|
||||
|
||||
=cut
|
||||
|
||||
use File::Find;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
die "Must have '/path/to/modules' and '/path/to/modules.load'"
|
||||
unless $ARGV[0] && $ARGV[1];
|
||||
|
||||
find(
|
||||
{
|
||||
wanted => sub {
|
||||
return 1 if $File::Find::name !~ /\.so$/;
|
||||
my $modfile = $_;
|
||||
$modfile =~ /(lib|mod_)(.+)\.so$/;
|
||||
my $modname = $2;
|
||||
my $filename = "$ARGV[1]/$modname.load";
|
||||
unless ( -f $filename ) {
|
||||
open( FILE, ">", $filename ) or die "Cannot open $filename";
|
||||
print FILE "LoadModule " . $modname . "_module $File::Find::name\n";
|
||||
close(FILE);
|
||||
}
|
||||
},
|
||||
follow => 1,
|
||||
},
|
||||
$ARGV[0]
|
||||
);
|
||||
|
||||
exit 0;
|
||||
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,220 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
||||
package_name node['apache']['package']
|
||||
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']['dir']}/conf.d" do
|
||||
action :delete
|
||||
recursive true
|
||||
end
|
||||
|
||||
directory node['apache']['log_dir'] do
|
||||
mode '0755'
|
||||
end
|
||||
|
||||
# perl is needed for the a2* scripts
|
||||
package node['apache']['perl_pkg']
|
||||
|
||||
%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
|
||||
|
||||
# enable mod_deflate for consistency across distributions
|
||||
include_recipe 'apache2::mod_deflate'
|
||||
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' && node['apache']['version'] == '2.2'
|
||||
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', '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', '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' && !platform_family?('freebsd')
|
||||
# on freebsd the prefork mpm is staticly compiled in
|
||||
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
|
||||
|
||||
service 'apache2' do
|
||||
service_name node['apache']['service_name']
|
||||
case node['platform_family']
|
||||
when 'rhel'
|
||||
restart_command '/sbin/service httpd restart && sleep 1' if node['apache']['version'] == '2.2'
|
||||
reload_command '/sbin/service httpd graceful'
|
||||
when 'debian'
|
||||
provider Chef::Provider::Service::Debian
|
||||
when 'arch'
|
||||
service_name 'httpd'
|
||||
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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,50 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
||||
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
|
||||
action :delete
|
||||
backup false
|
||||
end
|
||||
|
||||
apache_module 'apreq'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,68 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
||||
yum_package 'mod_auth_cas' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/auth_cas.conf" do
|
||||
action :delete
|
||||
backup false
|
||||
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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,122 @@
|
|||
#
|
||||
# Cookbook Name:: 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) => %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'
|
||||
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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,26 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
||||
package_name 'mod_dav_svn'
|
||||
else
|
||||
package_name 'libapache2-svn'
|
||||
end
|
||||
end
|
||||
|
||||
case node['platform_family']
|
||||
when 'rhel', 'fedora', 'suse'
|
||||
file "#{node['apache']['dir']}/conf.d/subversion.conf" do
|
||||
action :delete
|
||||
backup false
|
||||
end
|
||||
end
|
||||
|
||||
apache_module 'dav_svn'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,64 @@
|
|||
#
|
||||
# Cookbook Name:: 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 platform_family?('debian')
|
||||
if node['apache']['mod_fastcgi']['install_method'] == 'source'
|
||||
package 'build-essential'
|
||||
package node['apache']['devel_package']
|
||||
else
|
||||
package 'libapache2-mod-fastcgi'
|
||||
end
|
||||
elsif platform_family?('rhel')
|
||||
%W(gcc make libtool #{node['apache']['devel_package']} apr-devel apr).each do |package|
|
||||
yum_package package do
|
||||
action :upgrade
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if platform_family?('rhel') || (platform_family?('debian') && node['apache']['mod_fastcgi']['install_method'] == 'source')
|
||||
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
|
||||
|
||||
if platform_family?('debian')
|
||||
top_dir = node['apache']['build_dir']
|
||||
else
|
||||
top_dir = 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')
|
||||
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
|
|
@ -0,0 +1,55 @@
|
|||
#
|
||||
# Cookbook Name:: 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')
|
||||
package 'mod_fcgid' do
|
||||
notifies :run, 'execute[generate-module-list]', :immediately
|
||||
end
|
||||
|
||||
file "#{node['apache']['dir']}/conf.d/fcgid.conf" do
|
||||
action :delete
|
||||
backup false
|
||||
end
|
||||
|
||||
directory '/var/run/httpd/mod_fcgid' do
|
||||
owner node['apache']['user']
|
||||
group node['apache']['group']
|
||||
recursive true
|
||||
only_if { node['platform_version'].to_i >= 6 }
|
||||
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
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
|
@ -0,0 +1,30 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
||||
package_name 'mod_jk'
|
||||
else
|
||||
package_name 'libapache2-mod-jk'
|
||||
end
|
||||
end
|
||||
|
||||
apache_module 'jk'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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.
|
||||
#
|
||||
|
||||
apache_module 'ldap' do
|
||||
conf true
|
||||
end
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Cookbook Name:: 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')
|
||||
apache_module 'log_config'
|
||||
else
|
||||
include_recipe 'apache2::default'
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Cookbook Name:: 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')
|
||||
apache_module 'logio'
|
||||
else
|
||||
include_recipe 'apache2::default'
|
||||
end
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,20 @@
|
|||
#
|
||||
# Cookbook Name:: 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'
|
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Cookbook Name:: 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
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue