vagrant-managed-servers 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/.travis.yml +5 -0
- data/Berksfile +1 -1
- data/CHANGELOG.md +7 -1
- data/Gemfile +8 -4
- data/README.md +5 -3
- data/Rakefile +11 -0
- data/Vagrantfile +3 -2
- data/lib/vagrant-managed-servers/action/sync_folders.rb +5 -3
- data/lib/vagrant-managed-servers/version.rb +1 -1
- data/vagrant-managed-servers.gemspec +3 -3
- metadata +10 -134
- data/cookbooks/apache2/CHANGELOG.md +0 -95
- data/cookbooks/apache2/CONTRIBUTING.md +0 -257
- data/cookbooks/apache2/Gemfile +0 -10
- data/cookbooks/apache2/LICENSE +0 -201
- data/cookbooks/apache2/README.md +0 -567
- data/cookbooks/apache2/attributes/default.rb +0 -149
- data/cookbooks/apache2/attributes/mod_auth_cas.rb +0 -2
- data/cookbooks/apache2/attributes/mod_auth_openid.rb +0 -32
- data/cookbooks/apache2/definitions/apache_conf.rb +0 -26
- data/cookbooks/apache2/definitions/apache_module.rb +0 -53
- data/cookbooks/apache2/definitions/apache_site.rb +0 -43
- data/cookbooks/apache2/definitions/web_app.rb +0 -49
- data/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +0 -41
- data/cookbooks/apache2/files/default/tests/minitest/default_test.rb +0 -77
- data/cookbooks/apache2/files/default/tests/minitest/god_monitor_test.rb +0 -34
- data/cookbooks/apache2/files/default/tests/minitest/mod_apreq2_test.rb +0 -19
- data/cookbooks/apache2/files/default/tests/minitest/mod_auth_cas_test.rb +0 -11
- data/cookbooks/apache2/files/default/tests/minitest/mod_auth_openid_test.rb +0 -37
- data/cookbooks/apache2/files/default/tests/minitest/mod_cgi_test.rb +0 -13
- data/cookbooks/apache2/files/default/tests/minitest/mod_dav_svn_test.rb +0 -14
- data/cookbooks/apache2/files/default/tests/minitest/mod_fastcgi.rb +0 -11
- data/cookbooks/apache2/files/default/tests/minitest/mod_perl_test.rb +0 -18
- data/cookbooks/apache2/files/default/tests/minitest/mod_php5_test.rb +0 -13
- data/cookbooks/apache2/files/default/tests/minitest/mod_python_test.rb +0 -10
- data/cookbooks/apache2/files/default/tests/minitest/mod_ssl_test.rb +0 -23
- data/cookbooks/apache2/files/default/tests/minitest/support/helpers.rb +0 -50
- data/cookbooks/apache2/metadata.json +0 -513
- data/cookbooks/apache2/metadata.rb +0 -207
- data/cookbooks/apache2/recipes/default.rb +0 -208
- data/cookbooks/apache2/recipes/god_monitor.rb +0 -33
- data/cookbooks/apache2/recipes/logrotate.rb +0 -29
- data/cookbooks/apache2/recipes/mod_alias.rb +0 -22
- data/cookbooks/apache2/recipes/mod_apreq2.rb +0 -54
- data/cookbooks/apache2/recipes/mod_auth_basic.rb +0 -20
- data/cookbooks/apache2/recipes/mod_auth_cas.rb +0 -59
- data/cookbooks/apache2/recipes/mod_auth_digest.rb +0 -20
- data/cookbooks/apache2/recipes/mod_auth_openid.rb +0 -111
- data/cookbooks/apache2/recipes/mod_authn_file.rb +0 -20
- data/cookbooks/apache2/recipes/mod_authnz_ldap.rb +0 -20
- data/cookbooks/apache2/recipes/mod_authz_default.rb +0 -20
- data/cookbooks/apache2/recipes/mod_authz_groupfile.rb +0 -20
- data/cookbooks/apache2/recipes/mod_authz_host.rb +0 -20
- data/cookbooks/apache2/recipes/mod_authz_user.rb +0 -20
- data/cookbooks/apache2/recipes/mod_autoindex.rb +0 -22
- data/cookbooks/apache2/recipes/mod_cgi.rb +0 -20
- data/cookbooks/apache2/recipes/mod_dav.rb +0 -20
- data/cookbooks/apache2/recipes/mod_dav_fs.rb +0 -21
- data/cookbooks/apache2/recipes/mod_dav_svn.rb +0 -41
- data/cookbooks/apache2/recipes/mod_deflate.rb +0 -22
- data/cookbooks/apache2/recipes/mod_dir.rb +0 -22
- data/cookbooks/apache2/recipes/mod_env.rb +0 -20
- data/cookbooks/apache2/recipes/mod_expires.rb +0 -20
- data/cookbooks/apache2/recipes/mod_fastcgi.rb +0 -26
- data/cookbooks/apache2/recipes/mod_fcgid.rb +0 -55
- data/cookbooks/apache2/recipes/mod_headers.rb +0 -20
- data/cookbooks/apache2/recipes/mod_include.rb +0 -20
- data/cookbooks/apache2/recipes/mod_ldap.rb +0 -20
- data/cookbooks/apache2/recipes/mod_log_config.rb +0 -24
- data/cookbooks/apache2/recipes/mod_logio.rb +0 -24
- data/cookbooks/apache2/recipes/mod_mime.rb +0 -22
- data/cookbooks/apache2/recipes/mod_negotiation.rb +0 -22
- data/cookbooks/apache2/recipes/mod_perl.rb +0 -44
- data/cookbooks/apache2/recipes/mod_php5.rb +0 -77
- data/cookbooks/apache2/recipes/mod_proxy.rb +0 -22
- data/cookbooks/apache2/recipes/mod_proxy_ajp.rb +0 -21
- data/cookbooks/apache2/recipes/mod_proxy_balancer.rb +0 -20
- data/cookbooks/apache2/recipes/mod_proxy_connect.rb +0 -20
- data/cookbooks/apache2/recipes/mod_proxy_http.rb +0 -20
- data/cookbooks/apache2/recipes/mod_python.rb +0 -38
- data/cookbooks/apache2/recipes/mod_rewrite.rb +0 -20
- data/cookbooks/apache2/recipes/mod_setenvif.rb +0 -22
- data/cookbooks/apache2/recipes/mod_ssl.rb +0 -46
- data/cookbooks/apache2/recipes/mod_status.rb +0 -22
- data/cookbooks/apache2/recipes/mod_wsgi.rb +0 -38
- data/cookbooks/apache2/recipes/mod_xsendfile.rb +0 -38
- data/cookbooks/apache2/templates/default/a2dismod.erb +0 -22
- data/cookbooks/apache2/templates/default/a2dissite.erb +0 -29
- data/cookbooks/apache2/templates/default/a2enmod.erb +0 -37
- data/cookbooks/apache2/templates/default/a2ensite.erb +0 -38
- data/cookbooks/apache2/templates/default/apache2.conf.erb +0 -237
- data/cookbooks/apache2/templates/default/apache2.god.erb +0 -19
- data/cookbooks/apache2/templates/default/charset.erb +0 -6
- data/cookbooks/apache2/templates/default/default-site.erb +0 -57
- data/cookbooks/apache2/templates/default/mods/README +0 -2
- data/cookbooks/apache2/templates/default/mods/alias.conf.erb +0 -24
- data/cookbooks/apache2/templates/default/mods/auth_cas.conf.erb +0 -1
- data/cookbooks/apache2/templates/default/mods/auth_cas.load.erb +0 -1
- data/cookbooks/apache2/templates/default/mods/authopenid.load.erb +0 -1
- data/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +0 -101
- data/cookbooks/apache2/templates/default/mods/deflate.conf.erb +0 -16
- data/cookbooks/apache2/templates/default/mods/dir.conf.erb +0 -5
- data/cookbooks/apache2/templates/default/mods/fastcgi.conf.erb +0 -5
- data/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +0 -10
- data/cookbooks/apache2/templates/default/mods/mime.conf.erb +0 -198
- data/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +0 -18
- data/cookbooks/apache2/templates/default/mods/php5.conf.erb +0 -16
- data/cookbooks/apache2/templates/default/mods/proxy.conf.erb +0 -19
- data/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +0 -28
- data/cookbooks/apache2/templates/default/mods/ssl.conf.erb +0 -76
- data/cookbooks/apache2/templates/default/mods/status.conf.erb +0 -26
- data/cookbooks/apache2/templates/default/port_apache.erb +0 -2
- data/cookbooks/apache2/templates/default/ports.conf.erb +0 -6
- data/cookbooks/apache2/templates/default/security.erb +0 -50
- data/cookbooks/apache2/templates/default/web_app.conf.erb +0 -43
- data/cookbooks/apt/Berksfile +0 -8
- data/cookbooks/apt/CHANGELOG.md +0 -97
- data/cookbooks/apt/CONTRIBUTING +0 -29
- data/cookbooks/apt/LICENSE +0 -201
- data/cookbooks/apt/README.md +0 -243
- data/cookbooks/apt/TESTING.md +0 -25
- data/cookbooks/apt/attributes/default.rb +0 -4
- data/cookbooks/apt/files/default/apt-proxy-v2.conf +0 -50
- data/cookbooks/apt/metadata.json +0 -1
- data/cookbooks/apt/metadata.rb +0 -30
- data/cookbooks/apt/providers/preference.rb +0 -61
- data/cookbooks/apt/providers/repository.rb +0 -132
- data/cookbooks/apt/recipes/cacher-client.rb +0 -59
- data/cookbooks/apt/recipes/cacher-ng.rb +0 -40
- data/cookbooks/apt/recipes/default.rb +0 -68
- data/cookbooks/apt/resources/preference.rb +0 -30
- data/cookbooks/apt/resources/repository.rb +0 -40
- data/cookbooks/apt/templates/debian-6.0/acng.conf.erb +0 -174
- data/cookbooks/apt/templates/default/01proxy.erb +0 -2
- data/cookbooks/apt/templates/default/acng.conf.erb +0 -276
- data/cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb +0 -270
@@ -1,207 +0,0 @@
|
|
1
|
-
maintainer "Opscode, Inc."
|
2
|
-
maintainer_email "cookbooks@opscode.com"
|
3
|
-
license "Apache 2.0"
|
4
|
-
description "Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions"
|
5
|
-
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
6
|
-
version "1.2.0"
|
7
|
-
recipe "apache2", "Main Apache configuration"
|
8
|
-
recipe "apache2::logrotate", "Rotate apache2 logs. Requires logrotate cookbook"
|
9
|
-
recipe "apache2::mod_alias", "Apache module 'alias' with config file"
|
10
|
-
recipe "apache2::mod_apreq2", "Apache module 'apreq'"
|
11
|
-
recipe "apache2::mod_auth_basic", "Apache module 'auth_basic'"
|
12
|
-
recipe "apache2::mod_auth_digest", "Apache module 'auth_digest'"
|
13
|
-
recipe "apache2::mod_auth_openid", "Apache module 'authopenid'"
|
14
|
-
recipe "apache2::mod_authn_file", "Apache module 'authn_file'"
|
15
|
-
recipe "apache2::mod_authnz_ldap", "Apache module 'authnz_ldap'"
|
16
|
-
recipe "apache2::mod_authz_default", "Apache module 'authz_default'"
|
17
|
-
recipe "apache2::mod_authz_groupfile", "Apache module 'authz_groupfile'"
|
18
|
-
recipe "apache2::mod_authz_host", "Apache module 'authz_host'"
|
19
|
-
recipe "apache2::mod_authz_user", "Apache module 'authz_user'"
|
20
|
-
recipe "apache2::mod_autoindex", "Apache module 'autoindex' with config file"
|
21
|
-
recipe "apache2::mod_cgi", "Apache module 'cgi'"
|
22
|
-
recipe "apache2::mod_dav", "Apache module 'dav'"
|
23
|
-
recipe "apache2::mod_dav_svn", "Apache module 'dav_svn'"
|
24
|
-
recipe "apache2::mod_deflate", "Apache module 'deflate' with config file"
|
25
|
-
recipe "apache2::mod_dir", "Apache module 'dir' with config file"
|
26
|
-
recipe "apache2::mod_env", "Apache module 'env'"
|
27
|
-
recipe "apache2::mod_expires", "Apache module 'expires'"
|
28
|
-
recipe "apache2::mod_fcgid", "Apache module 'fcgid', package on ubuntu/debian, rhel/centos, compile source on suse; with config file"
|
29
|
-
recipe "apache2::mod_headers", "Apache module 'headers'"
|
30
|
-
recipe "apache2::mod_include", "Apache module 'include'"
|
31
|
-
recipe "apache2::mod_ldap", "Apache module 'ldap'"
|
32
|
-
recipe "apache2::mod_log_config", "Apache module 'log_config'"
|
33
|
-
recipe "apache2::mod_mime", "Apache module 'mime' with config file"
|
34
|
-
recipe "apache2::mod_negotiation", "Apache module 'negotiation' with config file"
|
35
|
-
recipe "apache2::mod_perl", "Apache module 'perl'"
|
36
|
-
recipe "apache2::mod_php5", "Apache module 'php5'"
|
37
|
-
recipe "apache2::mod_proxy", "Apache module 'proxy' with config file"
|
38
|
-
recipe "apache2::mod_proxy_ajp", "Apache module 'proxy_ajp'"
|
39
|
-
recipe "apache2::mod_proxy_balancer", "Apache module 'proxy_balancer'"
|
40
|
-
recipe "apache2::mod_proxy_connect", "Apache module 'proxy_connect'"
|
41
|
-
recipe "apache2::mod_proxy_http", "Apache module 'proxy_http'"
|
42
|
-
recipe "apache2::mod_python", "Apache module 'python'"
|
43
|
-
recipe "apache2::mod_rewrite", "Apache module 'rewrite'"
|
44
|
-
recipe "apache2::mod_setenvif", "Apache module 'setenvif' with config file"
|
45
|
-
recipe "apache2::mod_ssl", "Apache module 'ssl' with config file, adds port 443 to listen_ports"
|
46
|
-
recipe "apache2::mod_status", "Apache module 'status' with config file"
|
47
|
-
recipe "apache2::mod_xsendfile", "Apache module 'xsendfile'"
|
48
|
-
|
49
|
-
%w{redhat centos scientific fedora debian ubuntu arch freebsd amazon}.each do |os|
|
50
|
-
supports os
|
51
|
-
end
|
52
|
-
|
53
|
-
attribute "apache",
|
54
|
-
:display_name => "Apache Hash",
|
55
|
-
:description => "Hash of Apache attributes",
|
56
|
-
:type => "hash"
|
57
|
-
|
58
|
-
attribute "apache/dir",
|
59
|
-
:display_name => "Apache Directory",
|
60
|
-
:description => "Location for Apache configuration",
|
61
|
-
:default => "/etc/apache2"
|
62
|
-
|
63
|
-
attribute "apache/log_dir",
|
64
|
-
:display_name => "Apache Log Directory",
|
65
|
-
:description => "Location for Apache logs",
|
66
|
-
:default => "/etc/apache2"
|
67
|
-
|
68
|
-
attribute "apache/user",
|
69
|
-
:display_name => "Apache User",
|
70
|
-
:description => "User Apache runs as",
|
71
|
-
:default => "www-data"
|
72
|
-
|
73
|
-
attribute "apache/binary",
|
74
|
-
:display_name => "Apache Binary",
|
75
|
-
:description => "Apache server daemon program",
|
76
|
-
:default => "/usr/sbin/apache2"
|
77
|
-
|
78
|
-
attribute "apache/icondir",
|
79
|
-
:display_name => "Apache Icondir",
|
80
|
-
:description => "Directory location for icons",
|
81
|
-
:default => "/usr/share/apache2/icons"
|
82
|
-
|
83
|
-
attribute "apache/listen_ports",
|
84
|
-
:display_name => "Apache Listen Ports",
|
85
|
-
:description => "Ports that Apache should listen on",
|
86
|
-
:type => "array",
|
87
|
-
:default => [ "80", "443" ]
|
88
|
-
|
89
|
-
attribute "apache/contact",
|
90
|
-
:display_name => "Apache Contact",
|
91
|
-
:description => "Email address of webmaster",
|
92
|
-
:default => "ops@example.com"
|
93
|
-
|
94
|
-
attribute "apache/timeout",
|
95
|
-
:display_name => "Apache Timeout",
|
96
|
-
:description => "Connection timeout value",
|
97
|
-
:default => "300"
|
98
|
-
|
99
|
-
attribute "apache/keepalive",
|
100
|
-
:display_name => "Apache Keepalive",
|
101
|
-
:description => "HTTP persistent connections",
|
102
|
-
:default => "On"
|
103
|
-
|
104
|
-
attribute "apache/keepaliverequests",
|
105
|
-
:display_name => "Apache Keepalive Requests",
|
106
|
-
:description => "Number of requests allowed on a persistent connection",
|
107
|
-
:default => "100"
|
108
|
-
|
109
|
-
attribute "apache/keepalivetimeout",
|
110
|
-
:display_name => "Apache Keepalive Timeout",
|
111
|
-
:description => "Time to wait for requests on persistent connection",
|
112
|
-
:default => "5"
|
113
|
-
|
114
|
-
attribute "apache/servertokens",
|
115
|
-
:display_name => "Apache Server Tokens",
|
116
|
-
:description => "Server response header",
|
117
|
-
:default => "Prod"
|
118
|
-
|
119
|
-
attribute "apache/serversignature",
|
120
|
-
:display_name => "Apache Server Signature",
|
121
|
-
:description => "Configure footer on server-generated documents",
|
122
|
-
:default => "On"
|
123
|
-
|
124
|
-
attribute "apache/traceenable",
|
125
|
-
:display_name => "Apache Trace Enable",
|
126
|
-
:description => "Determine behavior of TRACE requests",
|
127
|
-
:default => "On"
|
128
|
-
|
129
|
-
attribute "apache/allowed_openids",
|
130
|
-
:display_name => "Apache Allowed OpenIDs",
|
131
|
-
:description => "Array of OpenIDs allowed to authenticate",
|
132
|
-
:default => ""
|
133
|
-
|
134
|
-
attribute "apache/prefork",
|
135
|
-
:display_name => "Apache Prefork",
|
136
|
-
:description => "Hash of Apache prefork tuning attributes.",
|
137
|
-
:type => "hash"
|
138
|
-
|
139
|
-
attribute "apache/prefork/startservers",
|
140
|
-
:display_name => "Apache Prefork MPM StartServers",
|
141
|
-
:description => "Number of MPM servers to start",
|
142
|
-
:default => "16"
|
143
|
-
|
144
|
-
attribute "apache/prefork/minspareservers",
|
145
|
-
:display_name => "Apache Prefork MPM MinSpareServers",
|
146
|
-
:description => "Minimum number of spare server processes",
|
147
|
-
:default => "16"
|
148
|
-
|
149
|
-
attribute "apache/prefork/maxspareservers",
|
150
|
-
:display_name => "Apache Prefork MPM MaxSpareServers",
|
151
|
-
:description => "Maximum number of spare server processes",
|
152
|
-
:default => "32"
|
153
|
-
|
154
|
-
attribute "apache/prefork/serverlimit",
|
155
|
-
:display_name => "Apache Prefork MPM ServerLimit",
|
156
|
-
:description => "Upper limit on configurable server processes",
|
157
|
-
:default => "400"
|
158
|
-
|
159
|
-
attribute "apache/prefork/maxclients",
|
160
|
-
:display_name => "Apache Prefork MPM MaxClients",
|
161
|
-
:description => "Maximum number of simultaneous connections",
|
162
|
-
:default => "400"
|
163
|
-
|
164
|
-
attribute "apache/prefork/maxrequestsperchild",
|
165
|
-
:display_name => "Apache Prefork MPM MaxRequestsPerChild",
|
166
|
-
:description => "Maximum number of request a child process will handle",
|
167
|
-
:default => "10000"
|
168
|
-
|
169
|
-
attribute "apache/worker",
|
170
|
-
:display_name => "Apache Worker",
|
171
|
-
:description => "Hash of Apache prefork tuning attributes.",
|
172
|
-
:type => "hash"
|
173
|
-
|
174
|
-
attribute "apache/worker/startservers",
|
175
|
-
:display_name => "Apache Worker MPM StartServers",
|
176
|
-
:description => "Initial number of server processes to start",
|
177
|
-
:default => "4"
|
178
|
-
|
179
|
-
attribute "apache/worker/maxclients",
|
180
|
-
:display_name => "Apache Worker MPM MaxClients",
|
181
|
-
:description => "Maximum number of simultaneous connections",
|
182
|
-
:default => "1024"
|
183
|
-
|
184
|
-
attribute "apache/worker/minsparethreads",
|
185
|
-
:display_name => "Apache Worker MPM MinSpareThreads",
|
186
|
-
:description => "Minimum number of spare worker threads",
|
187
|
-
:default => "64"
|
188
|
-
|
189
|
-
attribute "apache/worker/maxsparethreads",
|
190
|
-
:display_name => "Apache Worker MPM MaxSpareThreads",
|
191
|
-
:description => "Maximum number of spare worker threads",
|
192
|
-
:default => "192"
|
193
|
-
|
194
|
-
attribute "apache/worker/threadsperchild",
|
195
|
-
:display_name => "Apache Worker MPM ThreadsPerChild",
|
196
|
-
:description => "Constant number of worker threads in each server process",
|
197
|
-
:default => "64"
|
198
|
-
|
199
|
-
attribute "apache/worker/maxrequestsperchild",
|
200
|
-
:display_name => "Apache Worker MPM MaxRequestsPerChild",
|
201
|
-
:description => "Maximum number of request a child process will handle",
|
202
|
-
:default => "0"
|
203
|
-
|
204
|
-
attribute "apache/default_modules",
|
205
|
-
:display_name => "Apache Default Modules",
|
206
|
-
:description => "Default modules to enable via recipes",
|
207
|
-
:default => "status alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex dir env mime negotiation setenvif"
|
@@ -1,208 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Cookbook Name:: apache2
|
3
|
-
# Recipe:: default
|
4
|
-
#
|
5
|
-
# Copyright 2008-2009, Opscode, Inc.
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
package "apache2" do
|
21
|
-
package_name node['apache']['package']
|
22
|
-
end
|
23
|
-
|
24
|
-
service "apache2" do
|
25
|
-
case node['platform_family']
|
26
|
-
when "rhel", "fedora", "suse"
|
27
|
-
service_name "httpd"
|
28
|
-
# If restarted/reloaded too quickly httpd has a habit of failing.
|
29
|
-
# This may happen with multiple recipes notifying apache to restart - like
|
30
|
-
# during the initial bootstrap.
|
31
|
-
restart_command "/sbin/service httpd restart && sleep 1"
|
32
|
-
reload_command "/sbin/service httpd reload && sleep 1"
|
33
|
-
when "debian"
|
34
|
-
service_name "apache2"
|
35
|
-
restart_command "/usr/sbin/invoke-rc.d apache2 restart && sleep 1"
|
36
|
-
reload_command "/usr/sbin/invoke-rc.d apache2 reload && sleep 1"
|
37
|
-
when "arch"
|
38
|
-
service_name "httpd"
|
39
|
-
when "freebsd"
|
40
|
-
service_name "apache22"
|
41
|
-
end
|
42
|
-
supports [:restart, :reload, :status]
|
43
|
-
action :enable
|
44
|
-
end
|
45
|
-
|
46
|
-
if platform_family?("rhel", "fedora", "arch", "suse", "freebsd")
|
47
|
-
directory node['apache']['log_dir'] do
|
48
|
-
mode 00755
|
49
|
-
end
|
50
|
-
|
51
|
-
package "perl"
|
52
|
-
|
53
|
-
cookbook_file "/usr/local/bin/apache2_module_conf_generate.pl" do
|
54
|
-
source "apache2_module_conf_generate.pl"
|
55
|
-
mode 00755
|
56
|
-
owner "root"
|
57
|
-
group node['apache']['root_group']
|
58
|
-
end
|
59
|
-
|
60
|
-
%w{sites-available sites-enabled mods-available mods-enabled}.each do |dir|
|
61
|
-
directory "#{node['apache']['dir']}/#{dir}" do
|
62
|
-
mode 00755
|
63
|
-
owner "root"
|
64
|
-
group node['apache']['root_group']
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
execute "generate-module-list" do
|
69
|
-
command "/usr/local/bin/apache2_module_conf_generate.pl #{node['apache']['lib_dir']} #{node['apache']['dir']}/mods-available"
|
70
|
-
end
|
71
|
-
|
72
|
-
%w{a2ensite a2dissite a2enmod a2dismod}.each do |modscript|
|
73
|
-
template "/usr/sbin/#{modscript}" do
|
74
|
-
source "#{modscript}.erb"
|
75
|
-
mode 00700
|
76
|
-
owner "root"
|
77
|
-
group node['apache']['root_group']
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
# installed by default on centos/rhel, remove in favour of mods-enabled
|
82
|
-
%w{ proxy_ajp auth_pam authz_ldap webalizer ssl welcome }.each do |f|
|
83
|
-
file "#{node['apache']['dir']}/conf.d/#{f}.conf" do
|
84
|
-
action :delete
|
85
|
-
backup false
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
# installed by default on centos/rhel, remove in favour of mods-enabled
|
90
|
-
file "#{node['apache']['dir']}/conf.d/README" do
|
91
|
-
action :delete
|
92
|
-
backup false
|
93
|
-
end
|
94
|
-
|
95
|
-
# enable mod_deflate for consistency across distributions
|
96
|
-
include_recipe "apache2::mod_deflate"
|
97
|
-
end
|
98
|
-
|
99
|
-
if platform_family?("freebsd")
|
100
|
-
|
101
|
-
file "#{node['apache']['dir']}/Includes/no-accf.conf" do
|
102
|
-
action :delete
|
103
|
-
backup false
|
104
|
-
end
|
105
|
-
|
106
|
-
directory "#{node['apache']['dir']}/Includes" do
|
107
|
-
action :delete
|
108
|
-
end
|
109
|
-
|
110
|
-
%w{httpd-autoindex.conf httpd-dav.conf httpd-default.conf httpd-info.conf
|
111
|
-
httpd-languages.conf httpd-manual.conf httpd-mpm.conf
|
112
|
-
httpd-multilang-errordoc.conf httpd-ssl.conf httpd-userdir.conf
|
113
|
-
httpd-vhosts.conf}.each do |f|
|
114
|
-
|
115
|
-
file "#{node['apache']['dir']}/extra/#{f}" do
|
116
|
-
action :delete
|
117
|
-
backup false
|
118
|
-
end
|
119
|
-
|
120
|
-
end
|
121
|
-
|
122
|
-
directory "#{node['apache']['dir']}/extra" do
|
123
|
-
action :delete
|
124
|
-
end
|
125
|
-
|
126
|
-
end
|
127
|
-
|
128
|
-
directory "#{node['apache']['dir']}/ssl" do
|
129
|
-
mode 00755
|
130
|
-
owner "root"
|
131
|
-
group node['apache']['root_group']
|
132
|
-
end
|
133
|
-
|
134
|
-
directory "#{node['apache']['dir']}/conf.d" do
|
135
|
-
mode 00755
|
136
|
-
owner "root"
|
137
|
-
group node['apache']['root_group']
|
138
|
-
end
|
139
|
-
|
140
|
-
directory node['apache']['cache_dir'] do
|
141
|
-
mode 00755
|
142
|
-
owner "root"
|
143
|
-
group node['apache']['root_group']
|
144
|
-
end
|
145
|
-
|
146
|
-
template "apache2.conf" do
|
147
|
-
case node['platform_family']
|
148
|
-
when "rhel", "fedora", "arch"
|
149
|
-
path "#{node['apache']['dir']}/conf/httpd.conf"
|
150
|
-
when "debian"
|
151
|
-
path "#{node['apache']['dir']}/apache2.conf"
|
152
|
-
when "freebsd"
|
153
|
-
path "#{node['apache']['dir']}/httpd.conf"
|
154
|
-
end
|
155
|
-
source "apache2.conf.erb"
|
156
|
-
owner "root"
|
157
|
-
group node['apache']['root_group']
|
158
|
-
mode 00644
|
159
|
-
notifies :restart, "service[apache2]"
|
160
|
-
end
|
161
|
-
|
162
|
-
template "apache2-conf-security" do
|
163
|
-
path "#{node['apache']['dir']}/conf.d/security"
|
164
|
-
source "security.erb"
|
165
|
-
owner "root"
|
166
|
-
group node['apache']['root_group']
|
167
|
-
mode 00644
|
168
|
-
backup false
|
169
|
-
notifies :restart, "service[apache2]"
|
170
|
-
end
|
171
|
-
|
172
|
-
template "apache2-conf-charset" do
|
173
|
-
path "#{node['apache']['dir']}/conf.d/charset"
|
174
|
-
source "charset.erb"
|
175
|
-
owner "root"
|
176
|
-
group node['apache']['root_group']
|
177
|
-
mode 00644
|
178
|
-
backup false
|
179
|
-
notifies :restart, "service[apache2]"
|
180
|
-
end
|
181
|
-
|
182
|
-
template "#{node['apache']['dir']}/ports.conf" do
|
183
|
-
source "ports.conf.erb"
|
184
|
-
owner "root"
|
185
|
-
group node['apache']['root_group']
|
186
|
-
variables :apache_listen_ports => node['apache']['listen_ports'].map{|p| p.to_i}.uniq
|
187
|
-
mode 00644
|
188
|
-
notifies :restart, "service[apache2]"
|
189
|
-
end
|
190
|
-
|
191
|
-
template "#{node['apache']['dir']}/sites-available/default" do
|
192
|
-
source "default-site.erb"
|
193
|
-
owner "root"
|
194
|
-
group node['apache']['root_group']
|
195
|
-
mode 00644
|
196
|
-
notifies :restart, "service[apache2]"
|
197
|
-
end
|
198
|
-
|
199
|
-
node['apache']['default_modules'].each do |mod|
|
200
|
-
module_recipe_name = mod =~ /^mod_/ ? mod : "mod_#{mod}"
|
201
|
-
include_recipe "apache2::#{module_recipe_name}"
|
202
|
-
end
|
203
|
-
|
204
|
-
apache_site "default" if node['apache']['default_site_enabled']
|
205
|
-
|
206
|
-
service "apache2" do
|
207
|
-
action :start
|
208
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Cookbook Name:: apache2
|
3
|
-
# Recipe:: god_monitor
|
4
|
-
#
|
5
|
-
# Copyright 2008-2009, Opscode, Inc.
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
apache_service = service "apache2" do
|
21
|
-
action :nothing
|
22
|
-
end
|
23
|
-
|
24
|
-
start_command = apache_service.start_command
|
25
|
-
stop_command = apache_service.stop_command
|
26
|
-
restart_command = apache_service.restart_command
|
27
|
-
|
28
|
-
god_monitor "apache2" do
|
29
|
-
config "apache2.god.erb"
|
30
|
-
start (start_command)?start_command : "/etc/init.d/#{apache_service.service_name} start"
|
31
|
-
restart (restart_command)?restart_command : "/etc/init.d/#{apache_service.service_name} restart"
|
32
|
-
stop (stop_command)?stop_command : "/etc/init.d/#{apache_service.service_name} stop"
|
33
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Cookbook Name:: apache2
|
3
|
-
# Recipe:: logrotate
|
4
|
-
#
|
5
|
-
# Copyright 2012, Opscode, Inc.
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
apache_service = service "apache2" do
|
21
|
-
action :nothing
|
22
|
-
end
|
23
|
-
|
24
|
-
begin
|
25
|
-
include_recipe 'logrotate'
|
26
|
-
rescue
|
27
|
-
Chef::Log.warn("The apache::logrotate recipe requires the logrotate cookbook. Install the cookbook with `knife cookbook site install logrotate`.")
|
28
|
-
end
|
29
|
-
logrotate_app apache_service.service_name
|
@@ -1,22 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Cookbook Name:: apache2
|
3
|
-
# Recipe:: alias
|
4
|
-
#
|
5
|
-
# Copyright 2008-2009, Opscode, Inc.
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
apache_module "alias" do
|
21
|
-
conf true
|
22
|
-
end
|
@@ -1,54 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Cookbook Name:: apache2
|
3
|
-
# Recipe:: apreq2
|
4
|
-
#
|
5
|
-
# modified from the python recipe by Jeremy Bingham
|
6
|
-
#
|
7
|
-
# Copyright 2008-2009, Opscode, Inc.
|
8
|
-
#
|
9
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
10
|
-
# you may not use this file except in compliance with the License.
|
11
|
-
# You may obtain a copy of the License at
|
12
|
-
#
|
13
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
14
|
-
#
|
15
|
-
# Unless required by applicable law or agreed to in writing, software
|
16
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
17
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
18
|
-
# See the License for the specific language governing permissions and
|
19
|
-
# limitations under the License.
|
20
|
-
#
|
21
|
-
|
22
|
-
include_recipe "apache2"
|
23
|
-
|
24
|
-
case node['platform_family']
|
25
|
-
when "debian"
|
26
|
-
|
27
|
-
package "libapache2-mod-apreq2"
|
28
|
-
|
29
|
-
when "rhel", "fedora"
|
30
|
-
|
31
|
-
package "libapreq2" do
|
32
|
-
notifies :run, "execute[generate-module-list]", :immediately
|
33
|
-
end
|
34
|
-
|
35
|
-
# seems that the apreq lib is weirdly broken or something - it needs to be
|
36
|
-
# loaded as "apreq", but on RHEL & derivitatives the file needs a symbolic
|
37
|
-
# link to mod_apreq.so.
|
38
|
-
link "/usr/lib64/httpd/modules/mod_apreq.so" do
|
39
|
-
to "/usr/lib64/httpd/modules/mod_apreq2.so"
|
40
|
-
only_if "test -f /usr/lib64/httpd/modules/mod_apreq2.so"
|
41
|
-
end
|
42
|
-
|
43
|
-
link "/usr/lib/httpd/modules/mod_apreq.so" do
|
44
|
-
to "/usr/lib/httpd/modules/mod_apreq2.so"
|
45
|
-
only_if "test -f /usr/lib/httpd/modules/mod_apreq2.so"
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
file "#{node['apache']['dir']}/conf.d/apreq.conf" do
|
50
|
-
action :delete
|
51
|
-
backup false
|
52
|
-
end
|
53
|
-
|
54
|
-
apache_module "apreq"
|
@@ -1,20 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Cookbook Name:: apache2
|
3
|
-
# Recipe:: auth_basic
|
4
|
-
#
|
5
|
-
# Copyright 2008-2009, Opscode, Inc.
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
apache_module "auth_basic"
|
@@ -1,59 +0,0 @@
|
|
1
|
-
include_recipe "apache2"
|
2
|
-
|
3
|
-
if node['apache']['mod_auth_cas']['from_source']
|
4
|
-
|
5
|
-
package "httpd-devel" do
|
6
|
-
package_name value_for_platform_family(
|
7
|
-
["rhel", "fedora", "suse"] => "httpd-devel",
|
8
|
-
"debian" => "apache2-dev"
|
9
|
-
)
|
10
|
-
end
|
11
|
-
|
12
|
-
git '/tmp/mod_auth_cas' do
|
13
|
-
repository 'git://github.com/Jasig/mod_auth_cas.git'
|
14
|
-
revision node['apache']['mod_auth_cas']['source_revision']
|
15
|
-
notifies :run, 'execute[compile mod_auth_cas]', :immediately
|
16
|
-
end
|
17
|
-
|
18
|
-
execute 'compile mod_auth_cas' do
|
19
|
-
command './configure && make && make install'
|
20
|
-
cwd '/tmp/mod_auth_cas'
|
21
|
-
not_if "test -f #{node['apache']['libexecdir']}/mod_auth_cas.so"
|
22
|
-
end
|
23
|
-
|
24
|
-
template "#{node['apache']['dir']}/mods-available/auth_cas.load" do
|
25
|
-
source 'mods/auth_cas.load.erb'
|
26
|
-
owner 'root'
|
27
|
-
group node['apache']['root_group']
|
28
|
-
mode 00644
|
29
|
-
end
|
30
|
-
|
31
|
-
else
|
32
|
-
case node['platform_family']
|
33
|
-
when "debian"
|
34
|
-
|
35
|
-
package "libapache2-mod-auth-cas"
|
36
|
-
|
37
|
-
when "rhel", "fedora"
|
38
|
-
|
39
|
-
yum_package "mod_auth_cas" do
|
40
|
-
notifies :run, "execute[generate-module-list]", :immediately
|
41
|
-
end
|
42
|
-
|
43
|
-
file "#{node['apache']['dir']}/conf.d/auth_cas.conf" do
|
44
|
-
action :delete
|
45
|
-
backup false
|
46
|
-
end
|
47
|
-
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
apache_module 'auth_cas' do
|
52
|
-
conf true
|
53
|
-
end
|
54
|
-
|
55
|
-
directory "#{node['apache']['cache_dir']}/mod_auth_cas" do
|
56
|
-
owner node['apache']['user']
|
57
|
-
group node['apache']['group']
|
58
|
-
mode 00700
|
59
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Cookbook Name:: apache2
|
3
|
-
# Recipe:: auth_digest
|
4
|
-
#
|
5
|
-
# Copyright 2008-2009, Opscode, Inc.
|
6
|
-
#
|
7
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
-
# you may not use this file except in compliance with the License.
|
9
|
-
# You may obtain a copy of the License at
|
10
|
-
#
|
11
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
-
#
|
13
|
-
# Unless required by applicable law or agreed to in writing, software
|
14
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
-
# See the License for the specific language governing permissions and
|
17
|
-
# limitations under the License.
|
18
|
-
#
|
19
|
-
|
20
|
-
apache_module "auth_digest"
|