fast_food 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (236) hide show
  1. data/.gitignore +17 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +73 -0
  5. data/Rakefile +8 -0
  6. data/chef/.chef/bootstrap/chef-solo.erb +27 -0
  7. data/chef/.chef/knife.rb +8 -0
  8. data/chef/.gitignore +1 -0
  9. data/chef/README +3 -0
  10. data/chef/cookbooks/README +1 -0
  11. data/chef/cookbooks/apache2/.gitignore +1 -0
  12. data/chef/cookbooks/apache2/CHANGELOG.md +81 -0
  13. data/chef/cookbooks/apache2/CONTRIBUTING +29 -0
  14. data/chef/cookbooks/apache2/Gemfile +10 -0
  15. data/chef/cookbooks/apache2/LICENSE +201 -0
  16. data/chef/cookbooks/apache2/README.md +373 -0
  17. data/chef/cookbooks/apache2/attributes/default.rb +149 -0
  18. data/chef/cookbooks/apache2/attributes/mod_auth_openid.rb +32 -0
  19. data/chef/cookbooks/apache2/definitions/apache_conf.rb +26 -0
  20. data/chef/cookbooks/apache2/definitions/apache_module.rb +53 -0
  21. data/chef/cookbooks/apache2/definitions/apache_site.rb +43 -0
  22. data/chef/cookbooks/apache2/definitions/web_app.rb +49 -0
  23. data/chef/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +41 -0
  24. data/chef/cookbooks/apache2/files/default/tests/minitest/default_test.rb +64 -0
  25. data/chef/cookbooks/apache2/files/default/tests/minitest/helpers.rb +36 -0
  26. data/chef/cookbooks/apache2/files/default/tests/minitest/mod_auth_openid_test.rb +25 -0
  27. data/chef/cookbooks/apache2/files/default/tests/minitest/mod_dav_svn_test.rb +16 -0
  28. data/chef/cookbooks/apache2/files/default/tests/minitest/mod_perl_test.rb +22 -0
  29. data/chef/cookbooks/apache2/files/default/tests/minitest/mod_php5_test.rb +19 -0
  30. data/chef/cookbooks/apache2/files/default/tests/minitest/mod_python_test.rb +14 -0
  31. data/chef/cookbooks/apache2/files/default/tests/minitest/mod_ssl_test.rb +19 -0
  32. data/chef/cookbooks/apache2/files/default/tests/minitest/mod_wsgi_test.rb +14 -0
  33. data/chef/cookbooks/apache2/files/default/tests/minitest/mod_xsendfile_test.rb +14 -0
  34. data/chef/cookbooks/apache2/files/default/tests/minitest/modules_test.rb +19 -0
  35. data/chef/cookbooks/apache2/metadata.json +511 -0
  36. data/chef/cookbooks/apache2/metadata.rb +205 -0
  37. data/chef/cookbooks/apache2/recipes/default.rb +221 -0
  38. data/chef/cookbooks/apache2/recipes/god_monitor.rb +33 -0
  39. data/chef/cookbooks/apache2/recipes/mod_alias.rb +22 -0
  40. data/chef/cookbooks/apache2/recipes/mod_apreq2.rb +45 -0
  41. data/chef/cookbooks/apache2/recipes/mod_auth_basic.rb +20 -0
  42. data/chef/cookbooks/apache2/recipes/mod_auth_digest.rb +20 -0
  43. data/chef/cookbooks/apache2/recipes/mod_auth_openid.rb +113 -0
  44. data/chef/cookbooks/apache2/recipes/mod_authn_file.rb +20 -0
  45. data/chef/cookbooks/apache2/recipes/mod_authnz_ldap.rb +20 -0
  46. data/chef/cookbooks/apache2/recipes/mod_authz_default.rb +20 -0
  47. data/chef/cookbooks/apache2/recipes/mod_authz_groupfile.rb +20 -0
  48. data/chef/cookbooks/apache2/recipes/mod_authz_host.rb +20 -0
  49. data/chef/cookbooks/apache2/recipes/mod_authz_user.rb +20 -0
  50. data/chef/cookbooks/apache2/recipes/mod_autoindex.rb +22 -0
  51. data/chef/cookbooks/apache2/recipes/mod_cgi.rb +20 -0
  52. data/chef/cookbooks/apache2/recipes/mod_dav.rb +20 -0
  53. data/chef/cookbooks/apache2/recipes/mod_dav_fs.rb +20 -0
  54. data/chef/cookbooks/apache2/recipes/mod_dav_svn.rb +29 -0
  55. data/chef/cookbooks/apache2/recipes/mod_deflate.rb +22 -0
  56. data/chef/cookbooks/apache2/recipes/mod_dir.rb +22 -0
  57. data/chef/cookbooks/apache2/recipes/mod_env.rb +20 -0
  58. data/chef/cookbooks/apache2/recipes/mod_expires.rb +20 -0
  59. data/chef/cookbooks/apache2/recipes/mod_fastcgi.rb +26 -0
  60. data/chef/cookbooks/apache2/recipes/mod_fcgid.rb +53 -0
  61. data/chef/cookbooks/apache2/recipes/mod_headers.rb +20 -0
  62. data/chef/cookbooks/apache2/recipes/mod_ldap.rb +20 -0
  63. data/chef/cookbooks/apache2/recipes/mod_log_config.rb +24 -0
  64. data/chef/cookbooks/apache2/recipes/mod_logio.rb +24 -0
  65. data/chef/cookbooks/apache2/recipes/mod_mime.rb +22 -0
  66. data/chef/cookbooks/apache2/recipes/mod_negotiation.rb +22 -0
  67. data/chef/cookbooks/apache2/recipes/mod_perl.rb +39 -0
  68. data/chef/cookbooks/apache2/recipes/mod_php5.rb +99 -0
  69. data/chef/cookbooks/apache2/recipes/mod_proxy.rb +22 -0
  70. data/chef/cookbooks/apache2/recipes/mod_proxy_ajp.rb +21 -0
  71. data/chef/cookbooks/apache2/recipes/mod_proxy_balancer.rb +20 -0
  72. data/chef/cookbooks/apache2/recipes/mod_proxy_connect.rb +20 -0
  73. data/chef/cookbooks/apache2/recipes/mod_proxy_http.rb +20 -0
  74. data/chef/cookbooks/apache2/recipes/mod_python.rb +32 -0
  75. data/chef/cookbooks/apache2/recipes/mod_rewrite.rb +20 -0
  76. data/chef/cookbooks/apache2/recipes/mod_setenvif.rb +22 -0
  77. data/chef/cookbooks/apache2/recipes/mod_ssl.rb +43 -0
  78. data/chef/cookbooks/apache2/recipes/mod_status.rb +22 -0
  79. data/chef/cookbooks/apache2/recipes/mod_wsgi.rb +27 -0
  80. data/chef/cookbooks/apache2/recipes/mod_xsendfile.rb +27 -0
  81. data/chef/cookbooks/apache2/templates/default/a2dismod.erb +22 -0
  82. data/chef/cookbooks/apache2/templates/default/a2dissite.erb +29 -0
  83. data/chef/cookbooks/apache2/templates/default/a2enmod.erb +37 -0
  84. data/chef/cookbooks/apache2/templates/default/a2ensite.erb +38 -0
  85. data/chef/cookbooks/apache2/templates/default/apache2.conf.erb +237 -0
  86. data/chef/cookbooks/apache2/templates/default/apache2.god.erb +19 -0
  87. data/chef/cookbooks/apache2/templates/default/charset.erb +6 -0
  88. data/chef/cookbooks/apache2/templates/default/default-site.erb +57 -0
  89. data/chef/cookbooks/apache2/templates/default/mods/README +2 -0
  90. data/chef/cookbooks/apache2/templates/default/mods/alias.conf.erb +24 -0
  91. data/chef/cookbooks/apache2/templates/default/mods/authopenid.load.erb +1 -0
  92. data/chef/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +101 -0
  93. data/chef/cookbooks/apache2/templates/default/mods/deflate.conf.erb +16 -0
  94. data/chef/cookbooks/apache2/templates/default/mods/dir.conf.erb +5 -0
  95. data/chef/cookbooks/apache2/templates/default/mods/fastcgi.conf.erb +5 -0
  96. data/chef/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +10 -0
  97. data/chef/cookbooks/apache2/templates/default/mods/mime.conf.erb +198 -0
  98. data/chef/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +18 -0
  99. data/chef/cookbooks/apache2/templates/default/mods/php5.conf.erb +16 -0
  100. data/chef/cookbooks/apache2/templates/default/mods/proxy.conf.erb +19 -0
  101. data/chef/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +28 -0
  102. data/chef/cookbooks/apache2/templates/default/mods/ssl.conf.erb +76 -0
  103. data/chef/cookbooks/apache2/templates/default/mods/status.conf.erb +26 -0
  104. data/chef/cookbooks/apache2/templates/default/port_apache.erb +2 -0
  105. data/chef/cookbooks/apache2/templates/default/ports.conf.erb +6 -0
  106. data/chef/cookbooks/apache2/templates/default/security.erb +50 -0
  107. data/chef/cookbooks/apache2/templates/default/web_app.conf.erb +43 -0
  108. data/chef/cookbooks/build-essential/.gitignore +4 -0
  109. data/chef/cookbooks/build-essential/CHANGELOG.md +31 -0
  110. data/chef/cookbooks/build-essential/CONTRIBUTING +29 -0
  111. data/chef/cookbooks/build-essential/Gemfile +3 -0
  112. data/chef/cookbooks/build-essential/LICENSE +201 -0
  113. data/chef/cookbooks/build-essential/README.md +129 -0
  114. data/chef/cookbooks/build-essential/attributes/default.rb +33 -0
  115. data/chef/cookbooks/build-essential/metadata.json +41 -0
  116. data/chef/cookbooks/build-essential/metadata.rb +14 -0
  117. data/chef/cookbooks/build-essential/recipes/default.rb +92 -0
  118. data/chef/cookbooks/database/.gitignore +1 -0
  119. data/chef/cookbooks/database/CHANGELOG.md +46 -0
  120. data/chef/cookbooks/database/CONTRIBUTING +29 -0
  121. data/chef/cookbooks/database/LICENSE +201 -0
  122. data/chef/cookbooks/database/README.md +468 -0
  123. data/chef/cookbooks/database/libraries/provider_database_mysql.rb +103 -0
  124. data/chef/cookbooks/database/libraries/provider_database_mysql_user.rb +76 -0
  125. data/chef/cookbooks/database/libraries/provider_database_postgresql.rb +131 -0
  126. data/chef/cookbooks/database/libraries/provider_database_postgresql_user.rb +83 -0
  127. data/chef/cookbooks/database/libraries/provider_database_sql_server.rb +109 -0
  128. data/chef/cookbooks/database/libraries/provider_database_sql_server_user.rb +106 -0
  129. data/chef/cookbooks/database/libraries/resource_database.rb +119 -0
  130. data/chef/cookbooks/database/libraries/resource_database_user.rb +90 -0
  131. data/chef/cookbooks/database/libraries/resource_mysql_database.rb +34 -0
  132. data/chef/cookbooks/database/libraries/resource_mysql_database_user.rb +34 -0
  133. data/chef/cookbooks/database/libraries/resource_postgresql_database.rb +35 -0
  134. data/chef/cookbooks/database/libraries/resource_postgresql_database_user.rb +35 -0
  135. data/chef/cookbooks/database/libraries/resource_sql_server_database.rb +34 -0
  136. data/chef/cookbooks/database/libraries/resource_sql_server_database_user.rb +34 -0
  137. data/chef/cookbooks/database/metadata.json +45 -0
  138. data/chef/cookbooks/database/metadata.rb +22 -0
  139. data/chef/cookbooks/database/recipes/default.rb +20 -0
  140. data/chef/cookbooks/database/recipes/ebs_backup.rb +89 -0
  141. data/chef/cookbooks/database/recipes/ebs_volume.rb +204 -0
  142. data/chef/cookbooks/database/recipes/master.rb +78 -0
  143. data/chef/cookbooks/database/recipes/mysql.rb +20 -0
  144. data/chef/cookbooks/database/recipes/postgresql.rb +20 -0
  145. data/chef/cookbooks/database/recipes/snapshot.rb +62 -0
  146. data/chef/cookbooks/database/templates/default/app_grants.sql.erb +8 -0
  147. data/chef/cookbooks/database/templates/default/aws_config.erb +3 -0
  148. data/chef/cookbooks/database/templates/default/chef-solo-database-snapshot.cron.erb +6 -0
  149. data/chef/cookbooks/database/templates/default/chef-solo-database-snapshot.json.erb +1 -0
  150. data/chef/cookbooks/database/templates/default/chef-solo-database-snapshot.rb.erb +6 -0
  151. data/chef/cookbooks/database/templates/default/ebs-backup-cron.erb +2 -0
  152. data/chef/cookbooks/database/templates/default/ebs-db-backup.sh.erb +8 -0
  153. data/chef/cookbooks/database/templates/default/ebs-db-restore.sh.erb +10 -0
  154. data/chef/cookbooks/database/templates/default/s3cfg.erb +27 -0
  155. data/chef/cookbooks/fast_food/recipes/default.rb +24 -0
  156. data/chef/cookbooks/fast_food/recipes/site.rb +7 -0
  157. data/chef/cookbooks/fast_food/templates/default/web_app.conf.erb +43 -0
  158. data/chef/cookbooks/git/CHANGELOG.md +49 -0
  159. data/chef/cookbooks/git/CONTRIBUTING +29 -0
  160. data/chef/cookbooks/git/LICENSE +201 -0
  161. data/chef/cookbooks/git/README.md +115 -0
  162. data/chef/cookbooks/git/attributes/default.rb +37 -0
  163. data/chef/cookbooks/git/metadata.json +48 -0
  164. data/chef/cookbooks/git/metadata.rb +20 -0
  165. data/chef/cookbooks/git/recipes/default.rb +46 -0
  166. data/chef/cookbooks/git/recipes/server.rb +38 -0
  167. data/chef/cookbooks/git/recipes/source.rb +48 -0
  168. data/chef/cookbooks/git/recipes/windows.rb +32 -0
  169. data/chef/cookbooks/git/templates/default/sv-git-daemon-log-run.erb +2 -0
  170. data/chef/cookbooks/git/templates/default/sv-git-daemon-run.erb +3 -0
  171. data/chef/cookbooks/imagemagick/README.md +57 -0
  172. data/chef/cookbooks/imagemagick/metadata.json +37 -0
  173. data/chef/cookbooks/imagemagick/metadata.rb +14 -0
  174. data/chef/cookbooks/imagemagick/recipes/default.rb +25 -0
  175. data/chef/cookbooks/imagemagick/recipes/devel.rb +32 -0
  176. data/chef/cookbooks/imagemagick/recipes/rmagick.rb +22 -0
  177. data/chef/cookbooks/mysql/.gitignore +5 -0
  178. data/chef/cookbooks/mysql/CHANGELOG.md +125 -0
  179. data/chef/cookbooks/mysql/CONTRIBUTING +29 -0
  180. data/chef/cookbooks/mysql/Gemfile +8 -0
  181. data/chef/cookbooks/mysql/LICENSE +201 -0
  182. data/chef/cookbooks/mysql/README.md +227 -0
  183. data/chef/cookbooks/mysql/attributes/client.rb +50 -0
  184. data/chef/cookbooks/mysql/attributes/server.rb +240 -0
  185. data/chef/cookbooks/mysql/files/default/tests/minitest/server_test.rb +36 -0
  186. data/chef/cookbooks/mysql/files/default/tests/minitest/support/helpers.rb +11 -0
  187. data/chef/cookbooks/mysql/libraries/helpers.rb +33 -0
  188. data/chef/cookbooks/mysql/metadata.json +418 -0
  189. data/chef/cookbooks/mysql/metadata.rb +140 -0
  190. data/chef/cookbooks/mysql/recipes/client.rb +59 -0
  191. data/chef/cookbooks/mysql/recipes/default.rb +20 -0
  192. data/chef/cookbooks/mysql/recipes/ruby.rb +36 -0
  193. data/chef/cookbooks/mysql/recipes/server.rb +221 -0
  194. data/chef/cookbooks/mysql/recipes/server_ec2.rb +51 -0
  195. data/chef/cookbooks/mysql/templates/default/debian.cnf.erb +12 -0
  196. data/chef/cookbooks/mysql/templates/default/grants.sql.erb +15 -0
  197. data/chef/cookbooks/mysql/templates/default/my.cnf.erb +312 -0
  198. data/chef/cookbooks/mysql/templates/default/mysql-server.seed.erb +10 -0
  199. data/chef/cookbooks/mysql/templates/default/port_mysql.erb +3 -0
  200. data/chef/cookbooks/mysql/templates/windows/my.cnf.erb +61 -0
  201. data/chef/cookbooks/openssl/README.md +37 -0
  202. data/chef/cookbooks/openssl/libraries/secure_password.rb +37 -0
  203. data/chef/cookbooks/openssl/metadata.json +30 -0
  204. data/chef/cookbooks/openssl/metadata.rb +8 -0
  205. data/chef/cookbooks/openssl/recipes/default.rb +19 -0
  206. data/chef/cookbooks/passenger_apache2/.gitignore +4 -0
  207. data/chef/cookbooks/passenger_apache2/CHANGELOG.md +29 -0
  208. data/chef/cookbooks/passenger_apache2/CONTRIBUTING +29 -0
  209. data/chef/cookbooks/passenger_apache2/Gemfile +3 -0
  210. data/chef/cookbooks/passenger_apache2/LICENSE +201 -0
  211. data/chef/cookbooks/passenger_apache2/README.md +77 -0
  212. data/chef/cookbooks/passenger_apache2/attributes/default.rb +5 -0
  213. data/chef/cookbooks/passenger_apache2/metadata.json +38 -0
  214. data/chef/cookbooks/passenger_apache2/metadata.rb +17 -0
  215. data/chef/cookbooks/passenger_apache2/recipes/default.rb +60 -0
  216. data/chef/cookbooks/passenger_apache2/recipes/mod_rails.rb +47 -0
  217. data/chef/cookbooks/passenger_apache2/templates/default/passenger.conf.erb +3 -0
  218. data/chef/cookbooks/passenger_apache2/templates/default/passenger.load.erb +1 -0
  219. data/chef/cookbooks/passenger_apache2/templates/default/passenger_web_app.conf.erb +32 -0
  220. data/chef/cookbooks/passenger_apache2/templates/default/web_app.conf.erb +32 -0
  221. data/chef/roles/apache2.rb +12 -0
  222. data/chef/roles/mysql.rb +18 -0
  223. data/chef/solo.rb +5 -0
  224. data/config/deploy/centos.sh +17 -0
  225. data/config/deploy/production.rb +3 -0
  226. data/config/deploy/ubuntu.sh +10 -0
  227. data/config/deploy.rb +99 -0
  228. data/config/deployment.yml +6 -0
  229. data/fast_food.gemspec +26 -0
  230. data/lib/fast_food/railtie.rb +9 -0
  231. data/lib/fast_food/version.rb +3 -0
  232. data/lib/fast_food.rb +5 -0
  233. data/lib/tasks/fast_food.rake +100 -0
  234. data/spec/lib/fast_food_spec.rb +0 -0
  235. data/spec/spec_helper.rb +1 -0
  236. metadata +349 -0
@@ -0,0 +1,237 @@
1
+ #
2
+ # Generated by Chef
3
+ #
4
+ # Based on the Ubuntu apache2.conf
5
+
6
+ ServerRoot "<%= node['apache']['dir'] %>"
7
+
8
+ #
9
+ # The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
10
+ #
11
+ <% if node['platform'] == "debian" || node['platform'] == "ubuntu" -%>
12
+ LockFile /var/lock/apache2/accept.lock
13
+ <% elsif node['platform'] == "freebsd" -%>
14
+ LockFile /var/log/accept.lock
15
+ <% else %>
16
+ LockFile logs/accept.lock
17
+ <% end -%>
18
+
19
+ #
20
+ # PidFile: The file in which the server should record its process
21
+ # identification number when it starts.
22
+ #
23
+ PidFile <%= node['apache']['pid_file'] %>
24
+
25
+ #
26
+ # Timeout: The number of seconds before receives and sends time out.
27
+ #
28
+ Timeout <%= node['apache']['timeout'] %>
29
+
30
+ #
31
+ # KeepAlive: Whether or not to allow persistent connections (more than
32
+ # one request per connection). Set to "Off" to deactivate.
33
+ #
34
+ KeepAlive <%= node['apache']['keepalive'] %>
35
+
36
+ #
37
+ # MaxKeepAliveRequests: The maximum number of requests to allow
38
+ # during a persistent connection. Set to 0 to allow an unlimited amount.
39
+ # We recommend you leave this number high, for maximum performance.
40
+ #
41
+ MaxKeepAliveRequests <%= node['apache']['keepaliverequests'] %>
42
+
43
+ #
44
+ # KeepAliveTimeout: Number of seconds to wait for the next request from the
45
+ # same client on the same connection.
46
+ #
47
+ KeepAliveTimeout <%= node['apache']['keepalivetimeout'] %>
48
+
49
+ ##
50
+ ## Server-Pool Size Regulation (MPM specific)
51
+ ##
52
+
53
+ # prefork MPM
54
+ # StartServers: number of server processes to start
55
+ # MinSpareServers: minimum number of server processes which are kept spare
56
+ # MaxSpareServers: maximum number of server processes which are kept spare
57
+ # MaxClients: maximum number of server processes allowed to start
58
+ # MaxRequestsPerChild: maximum number of requests a server process serves
59
+ <IfModule mpm_prefork_module>
60
+ StartServers <%= node['apache']['prefork']['startservers'] %>
61
+ MinSpareServers <%= node['apache']['prefork']['minspareservers'] %>
62
+ MaxSpareServers <%= node['apache']['prefork']['maxspareservers'] %>
63
+ ServerLimit <%= node['apache']['prefork']['serverlimit'] %>
64
+ MaxClients <%= node['apache']['prefork']['maxclients'] %>
65
+ MaxRequestsPerChild <%= node['apache']['prefork']['maxrequestsperchild'] %>
66
+ </IfModule>
67
+
68
+ # worker MPM
69
+ # StartServers: initial number of server processes to start
70
+ # MaxClients: maximum number of simultaneous client connections
71
+ # MinSpareThreads: minimum number of worker threads which are kept spare
72
+ # MaxSpareThreads: maximum number of worker threads which are kept spare
73
+ # ThreadsPerChild: constant number of worker threads in each server process
74
+ # MaxRequestsPerChild: maximum number of requests a server process serves
75
+ <IfModule mpm_worker_module>
76
+ StartServers <%= node['apache']['worker']['startservers'] %>
77
+ MaxClients <%= node['apache']['worker']['maxclients'] %>
78
+ MinSpareThreads <%= node['apache']['worker']['minsparethreads'] %>
79
+ MaxSpareThreads <%= node['apache']['worker']['maxsparethreads'] %>
80
+ ThreadsPerChild <%= node['apache']['worker']['threadsperchild'] %>
81
+ MaxRequestsPerChild <%= node['apache']['worker']['maxrequestsperchild'] %>
82
+ </IfModule>
83
+
84
+ User <%= node['apache']['user'] %>
85
+ Group <%= node['apache']['group'] %>
86
+
87
+ #
88
+ # AccessFileName: The name of the file to look for in each directory
89
+ # for additional configuration directives. See also the AllowOverride
90
+ # directive.
91
+ #
92
+
93
+ AccessFileName .htaccess
94
+
95
+ #
96
+ # The following lines prevent .htaccess and .htpasswd files from being
97
+ # viewed by Web clients.
98
+ #
99
+ <Files ~ "^\.ht">
100
+ Order allow,deny
101
+ Deny from all
102
+ </Files>
103
+
104
+ #
105
+ # DefaultType is the default MIME type the server will use for a document
106
+ # if it cannot otherwise determine one, such as from filename extensions.
107
+ # If your server contains mostly text or HTML documents, "text/plain" is
108
+ # a good value. If most of your content is binary, such as applications
109
+ # or images, you may want to use "application/octet-stream" instead to
110
+ # keep browsers from trying to display binary files as though they are
111
+ # text.
112
+ #
113
+ DefaultType text/plain
114
+
115
+
116
+ #
117
+ # HostnameLookups: Log the names of clients or just their IP addresses
118
+ # e.g., www.apache.org (on) or 204.62.129.132 (off).
119
+ # The default is off because it'd be overall better for the net if people
120
+ # had to knowingly turn this feature on, since enabling it means that
121
+ # each client request will result in AT LEAST one lookup request to the
122
+ # nameserver.
123
+ #
124
+ HostnameLookups Off
125
+
126
+ # ErrorLog: The location of the error log file.
127
+ # If you do not specify an ErrorLog directive within a <VirtualHost>
128
+ # container, error messages relating to that virtual host will be
129
+ # logged here. If you *do* define an error logfile for a <VirtualHost>
130
+ # container, that host's errors will be logged there and not here.
131
+ #
132
+ ErrorLog <%= node['apache']['log_dir'] %>/<%= node['apache']['error_log'] %>
133
+
134
+ #
135
+ # LogLevel: Control the number of messages logged to the error_log.
136
+ # Possible values include: debug, info, notice, warn, error, crit,
137
+ # alert, emerg.
138
+ #
139
+ LogLevel warn
140
+
141
+ # COOK-1021: Dummy LoadModule directive to aid module installations
142
+ #LoadModule dummy_module modules/mod_dummy.so
143
+
144
+ # Include module configuration:
145
+ Include <%= node['apache']['dir'] %>/mods-enabled/*.load
146
+ Include <%= node['apache']['dir'] %>/mods-enabled/*.conf
147
+
148
+ <% if node['platform'] == "freebsd" -%>
149
+ <IfDefine NOHTTPACCEPT>
150
+ AcceptFilter http none
151
+ AcceptFilter https none
152
+ </IfDefine>
153
+ <% end %>
154
+
155
+ # Include ports listing
156
+ Include <%= node['apache']['dir'] %>/ports.conf
157
+
158
+ #
159
+ # The following directives define some format nicknames for use with
160
+ # a CustomLog directive (see below).
161
+ #
162
+ LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
163
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
164
+ LogFormat "%h %l %u %t \"%r\" %>s %b" common
165
+ LogFormat "%{Referer}i -> %U" referer
166
+ LogFormat "%{User-agent}i" agent
167
+ #
168
+
169
+ # Customizable error responses come in three flavors:
170
+ # 1) plain text 2) local redirects 3) external redirects
171
+ #
172
+ # Some examples:
173
+ #ErrorDocument 500 "The server made a boo boo."
174
+ #ErrorDocument 404 /missing.html
175
+ #ErrorDocument 404 "/cgi-bin/missing_handler.pl"
176
+ #ErrorDocument 402 http://www.example.com/subscription_info.html
177
+ #
178
+
179
+ #
180
+ # Putting this all together, we can internationalize error responses.
181
+ #
182
+ # We use Alias to redirect any /error/HTTP_<error>.html.var response to
183
+ # our collection of by-error message multi-language collections. We use
184
+ # includes to substitute the appropriate text.
185
+ #
186
+ # You can modify the messages' appearance without changing any of the
187
+ # default HTTP_<error>.html.var files by adding the line:
188
+ #
189
+ # Alias /error/include/ "/your/include/path/"
190
+ #
191
+ # which allows you to create your own set of files by starting with the
192
+ # /usr/share/apache2/error/include/ files and copying them to /your/include/path/,
193
+ # even on a per-VirtualHost basis. The default include files will display
194
+ # your Apache version number and your ServerAdmin email address regardless
195
+ # of the setting of ServerSignature.
196
+ #
197
+ # The internationalized error documents require mod_alias, mod_include
198
+ # and mod_negotiation. To activate them, uncomment the following 30 lines.
199
+
200
+ # Alias /error/ "/usr/share/apache2/error/"
201
+ #
202
+ # <Directory "/usr/share/apache2/error">
203
+ # AllowOverride None
204
+ # Options IncludesNoExec
205
+ # AddOutputFilter Includes html
206
+ # AddHandler type-map var
207
+ # Order allow,deny
208
+ # Allow from all
209
+ # LanguagePriority en cs de es fr it nl sv pt-br ro
210
+ # ForceLanguagePriority Prefer Fallback
211
+ # </Directory>
212
+ #
213
+ # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
214
+ # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
215
+ # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
216
+ # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
217
+ # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
218
+ # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
219
+ # ErrorDocument 410 /error/HTTP_GONE.html.var
220
+ # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
221
+ # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
222
+ # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
223
+ # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
224
+ # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
225
+ # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
226
+ # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
227
+ # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
228
+ # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
229
+ # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
230
+
231
+
232
+
233
+ # Include generic snippets of statements
234
+ Include <%= node['apache']['dir'] %>/conf.d/
235
+
236
+ # Include the virtual host configurations:
237
+ Include <%= node['apache']['dir'] %>/sites-enabled/
@@ -0,0 +1,19 @@
1
+ God.watch do |w|
2
+ w.name = "apache2"
3
+ w.interval = 30.seconds # default
4
+ w.start = "<%= @params[:start] %>"
5
+ w.stop = "/etc/init.d/httpd stop"
6
+ w.restart = "<%= @params[:restart] %>"
7
+ w.start_grace = 10.seconds
8
+ w.restart_grace = 10.seconds
9
+ w.pid_file = "/var/run/httpd.pid"
10
+ w.behavior(:clean_pid_file)
11
+
12
+ w.start_if do |start|
13
+ start.condition(:process_running) do |c|
14
+ c.interval = 5.seconds
15
+ c.running = false
16
+ c.notify = 'admin'
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,6 @@
1
+ # Read the documentation before enabling AddDefaultCharset.
2
+ # In general, it is only a good idea if you know that all your files
3
+ # have this encoding. It will override any encoding given in the files
4
+ # in meta http-equiv or xml encoding tags.
5
+
6
+ #AddDefaultCharset UTF-8
@@ -0,0 +1,57 @@
1
+ <VirtualHost *:80>
2
+ ServerAdmin <%= node['apache']['contact'] %>
3
+
4
+ DocumentRoot /var/www/
5
+ <Directory />
6
+ Options FollowSymLinks
7
+ AllowOverride None
8
+ </Directory>
9
+ <Directory /var/www/>
10
+ Options Indexes FollowSymLinks MultiViews
11
+ AllowOverride None
12
+ Order allow,deny
13
+ allow from all
14
+ # This directive allows us to have apache2's default start page
15
+ # in /apache2-default/, but still have / go to the right place
16
+ #RedirectMatch ^/$ /apache2-default/
17
+ </Directory>
18
+
19
+ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
20
+ <Directory "/usr/lib/cgi-bin">
21
+ AllowOverride None
22
+ Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
23
+ Order allow,deny
24
+ Allow from all
25
+ </Directory>
26
+
27
+ ErrorLog <%= node['apache']['log_dir'] %>/error.log
28
+
29
+ # Possible values include: debug, info, notice, warn, error, crit,
30
+ # alert, emerg.
31
+ LogLevel warn
32
+
33
+ CustomLog <%= node['apache']['log_dir'] %>/access.log combined
34
+ ServerSignature On
35
+
36
+ Alias /doc/ "/usr/share/doc/"
37
+ <Directory "/usr/share/doc/">
38
+ Options Indexes MultiViews FollowSymLinks
39
+ AllowOverride None
40
+ Order deny,allow
41
+ Deny from all
42
+ Allow from 127.0.0.0/255.0.0.0 ::1/128
43
+ </Directory>
44
+
45
+ <% if %w{ redhat centos scientific fedora }.include?(node['platform']) -%>
46
+ #
47
+ # This configuration file enables the default "Welcome"
48
+ # page if there is no default index page present for
49
+ # the root URL. To disable the Welcome page, comment
50
+ # out all the lines below.
51
+ #
52
+ <LocationMatch "^/+$">
53
+ Options -Indexes
54
+ ErrorDocument 403 /error/noindex.html
55
+ </LocationMatch>
56
+ <% end -%>
57
+ </VirtualHost>
@@ -0,0 +1,2 @@
1
+ These configs are taken from a Debian apache2.2-common 2.2.11-3 install. They
2
+ work on CentOS 5.3 with a few conditions using erb.
@@ -0,0 +1,24 @@
1
+ <IfModule alias_module>
2
+ #
3
+ # Aliases: Add here as many aliases as you need (with no limit). The format is
4
+ # Alias fakename realname
5
+ #
6
+ # Note that if you include a trailing / on fakename then the server will
7
+ # require it to be present in the URL. So "/icons" isn't aliased in this
8
+ # example, only "/icons/". If the fakename is slash-terminated, then the
9
+ # realname must also be slash terminated, and if the fakename omits the
10
+ # trailing slash, the realname must also omit it.
11
+ #
12
+ # We include the /icons/ alias for FancyIndexed directory listings. If
13
+ # you do not use FancyIndexing, you may comment this out.
14
+ #
15
+ Alias /icons/ "<%= node['apache']['icondir'] %>/"
16
+
17
+ <Directory "<%= node['apache']['icondir'] %>">
18
+ Options Indexes MultiViews
19
+ AllowOverride None
20
+ Order allow,deny
21
+ Allow from all
22
+ </Directory>
23
+
24
+ </IfModule>
@@ -0,0 +1 @@
1
+ LoadModule authopenid_module <%= node['apache']['libexecdir'] %>/mod_auth_openid.so
@@ -0,0 +1,101 @@
1
+ <IfModule mod_autoindex.c>
2
+ #
3
+ # Directives controlling the display of server-generated directory listings.
4
+ #
5
+
6
+ #
7
+ # IndexOptions: Controls the appearance of server-generated directory
8
+ # listings.
9
+ # Remove/replace the "Charset=UTF-8" if you don't use UTF-8 for your filenames.
10
+ #
11
+ IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=* DescriptionWidth=* Charset=UTF-8
12
+
13
+ #
14
+ # AddIcon* directives tell the server which icon to show for different
15
+ # files or filename extensions. These are only displayed for
16
+ # FancyIndexed directories.
17
+ #
18
+ AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip x-bzip2
19
+
20
+ AddIconByType (TXT,/icons/text.gif) text/*
21
+ AddIconByType (IMG,/icons/image2.gif) image/*
22
+ AddIconByType (SND,/icons/sound2.gif) audio/*
23
+ AddIconByType (VID,/icons/movie.gif) video/*
24
+
25
+ AddIcon /icons/binary.gif .bin .exe
26
+ AddIcon /icons/binhex.gif .hqx
27
+ AddIcon /icons/tar.gif .tar
28
+ AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
29
+ AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
30
+ AddIcon /icons/a.gif .ps .ai .eps
31
+ AddIcon /icons/layout.gif .html .shtml .htm .pdf
32
+ AddIcon /icons/text.gif .txt
33
+ AddIcon /icons/c.gif .c
34
+ AddIcon /icons/p.gif .pl .py
35
+ AddIcon /icons/f.gif .for
36
+ AddIcon /icons/dvi.gif .dvi
37
+ AddIcon /icons/uuencoded.gif .uu
38
+ AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
39
+ AddIcon /icons/tex.gif .tex
40
+ # It's a suffix rule, so simply matching "core" matches "score" as well !
41
+ AddIcon /icons/bomb.gif /core
42
+ AddIcon (SND,/icons/sound2.gif) .ogg
43
+ AddIcon (VID,/icons/movie.gif) .ogm
44
+
45
+ AddIcon /icons/back.gif ..
46
+ AddIcon /icons/hand.right.gif README
47
+ AddIcon /icons/folder.gif ^^DIRECTORY^^
48
+ AddIcon /icons/blank.gif ^^BLANKICON^^
49
+
50
+ # Default icons for OpenDocument format
51
+ AddIcon /icons/odf6odt-20x22.png .odt
52
+ AddIcon /icons/odf6ods-20x22.png .ods
53
+ AddIcon /icons/odf6odp-20x22.png .odp
54
+ AddIcon /icons/odf6odg-20x22.png .odg
55
+ AddIcon /icons/odf6odc-20x22.png .odc
56
+ AddIcon /icons/odf6odf-20x22.png .odf
57
+ AddIcon /icons/odf6odb-20x22.png .odb
58
+ AddIcon /icons/odf6odi-20x22.png .odi
59
+ AddIcon /icons/odf6odm-20x22.png .odm
60
+
61
+ AddIcon /icons/odf6ott-20x22.png .ott
62
+ AddIcon /icons/odf6ots-20x22.png .ots
63
+ AddIcon /icons/odf6otp-20x22.png .otp
64
+ AddIcon /icons/odf6otg-20x22.png .otg
65
+ AddIcon /icons/odf6otc-20x22.png .otc
66
+ AddIcon /icons/odf6otf-20x22.png .otf
67
+ AddIcon /icons/odf6oti-20x22.png .oti
68
+ AddIcon /icons/odf6oth-20x22.png .oth
69
+
70
+ #
71
+ # DefaultIcon is which icon to show for files which do not have an icon
72
+ # explicitly set.
73
+ #
74
+ DefaultIcon /icons/unknown.gif
75
+
76
+ #
77
+ # AddDescription allows you to place a short description after a file in
78
+ # server-generated indexes. These are only displayed for FancyIndexed
79
+ # directories.
80
+ # Format: AddDescription "description" filename
81
+ #
82
+ #AddDescription "GZIP compressed document" .gz
83
+ #AddDescription "tar archive" .tar
84
+ #AddDescription "GZIP compressed tar archive" .tgz
85
+
86
+ #
87
+ # ReadmeName is the name of the README file the server will look for by
88
+ # default, and append to directory listings.
89
+ #
90
+ # HeaderName is the name of a file which should be prepended to
91
+ # directory indexes.
92
+ ReadmeName README.html
93
+ HeaderName HEADER.html
94
+
95
+ #
96
+ # IndexIgnore is a set of filenames which directory indexing should ignore
97
+ # and not include in the listing. Shell-style wildcarding is permitted.
98
+ #
99
+ IndexIgnore .??* *~ *# RCS CVS *,v *,t
100
+
101
+ </IfModule>
@@ -0,0 +1,16 @@
1
+ <IfModule mod_deflate.c>
2
+ AddOutputFilterByType DEFLATE text/html
3
+ AddOutputFilterByType DEFLATE text/css
4
+ AddOutputFilterByType DEFLATE text/plain
5
+ AddOutputFilterByType DEFLATE text/xml
6
+ AddOutputFilterByType DEFLATE application/xhtml+xml
7
+ AddOutputFilterByType DEFLATE application/xml
8
+ AddOutputFilterByType DEFLATE image/svg+xml
9
+ AddOutputFilterByType DEFLATE application/rss+xml
10
+ AddOutputFilterByType DEFLATE application/atom_xml
11
+ AddOutputFilterByType DEFLATE application/javascript
12
+ AddOutputFilterByType DEFLATE application/x-javascript
13
+ AddOutputFilterByType DEFLATE application/x-httpd-php
14
+ AddOutputFilterByType DEFLATE application/x-httpd-fastphp
15
+ AddOutputFilterByType DEFLATE application/x-httpd-eruby
16
+ </IfModule>
@@ -0,0 +1,5 @@
1
+ <IfModule mod_dir.c>
2
+
3
+ DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
4
+
5
+ </IfModule>
@@ -0,0 +1,5 @@
1
+ <IfModule mod_fastcgi.c>
2
+ AddHandler fastcgi-script .fcgi
3
+ #FastCgiWrapper /usr/lib/apache2/suexec
4
+ FastCgiIpcDir /var/lib/apache2/fastcgi
5
+ </IfModule>
@@ -0,0 +1,10 @@
1
+ <IfModule mod_fcgid.c>
2
+ AddHandler fcgid-script .fcgi
3
+ IPCConnectTimeout 20
4
+ </IfModule>
5
+
6
+ <% if %w{ redhat centos scientific fedora }.include?(node['platform']) -%>
7
+ # Sane place to put sockets and shared memory file
8
+ SocketPath run/mod_fcgid
9
+ SharememPath run/mod_fcgid/fcgid_shm
10
+ <% end -%>