Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated apache2 cookbook to latest version

  • Loading branch information...
commit 8a4a503ee2b780e4f460106b0cc7ed4947cccc16 1 parent d687828
@mdxp authored
View
93 apache2/README.md
@@ -12,6 +12,45 @@ Debian-style Apache configuration uses scripts to manage modules and sites (vhos
This cookbook ships with templates of these scripts for non Debian/Ubuntu platforms. The scripts are used in the __Definitions__ below.
+Changes/Roadmap
+===============
+
+### 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 :).
+
Requirements
============
@@ -75,6 +114,9 @@ These are general settings used in recipes and templates. Default values are not
* `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']['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`".
+
+The modules listed in `default_modules` will be included as recipes in `recipe[apache::default]`.
Prefork attributes
------------------
@@ -99,6 +141,17 @@ Worker attributes are used for tuning the Apache HTTPD worker MPM configuration.
* `node['apache']['worker']['maxsparethreads]` - Maximum number of spare worker threads. Default 192.
* `node['apache']['worker']['maxrequestsperchild']` - Maximum number of requests a child process will handle.
+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']['version']` - version of the `mod_auth_openid` to download.
+* `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.
+
Recipes
=======
@@ -111,20 +164,28 @@ On RHEL Family distributions, certain modules ship with a config file with the p
default
-------
-The default recipe does a number of things to set up Apache HTTPd.
+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\_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:
- AuthOpenIDEnabled On
- AuthOpenIDDBLocation /var/cache/apache2/mod_auth_openid.db
- AuthOpenIDUserProgram /usr/local/bin/mod_auth_openid.rb
+ 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:
-Change the DBLocation as appropriate for your platform. You'll need to change the file in the recipe to match. The UserProgram is optional if you don't want to limit access by certain OpenIDs.
+* `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\_fcgid
----------
@@ -292,28 +353,6 @@ Using this cookbook is relatively straightforward. Add the desired recipes to th
For examples of using the definitions in your own recipes, see their respective sections above.
-Changes
-=======
-
-## 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 :).
-
License and Authors
===================
View
28 apache2/attributes/default.rb
@@ -17,9 +17,12 @@
# limitations under the License.
#
+set[:apache][:root_group] = "root"
+
# Where the various parts of apache are
case platform
when "redhat","centos","scientific","fedora","suse"
+ set[:apache][:package] = "httpd"
set[:apache][:dir] = "/etc/httpd"
set[:apache][:log_dir] = "/var/log/httpd"
set[:apache][:user] = "apache"
@@ -32,8 +35,9 @@
else
set[:apache][:pid_file] = "/var/run/httpd.pid"
end
- set[:apache][:lib_dir] = node[:kernel][:machine] == "i386" ? "/usr/lib/httpd" : "/usr/lib64/httpd"
+ set[:apache][:lib_dir] = node[:kernel][:machine] =~ /^i[36]86$/ ? "/usr/lib/httpd" : "/usr/lib64/httpd"
when "debian","ubuntu"
+ set[:apache][:package] = "apache2"
set[:apache][:dir] = "/etc/apache2"
set[:apache][:log_dir] = "/var/log/apache2"
set[:apache][:user] = "www-data"
@@ -44,6 +48,7 @@
set[:apache][:pid_file] = "/var/run/apache2.pid"
set[:apache][:lib_dir] = "/usr/lib/apache2"
when "arch"
+ set[:apache][:package] = "apache"
set[:apache][:dir] = "/etc/httpd"
set[:apache][:log_dir] = "/var/log/httpd"
set[:apache][:user] = "http"
@@ -53,6 +58,18 @@
set[:apache][:cache_dir] = "/var/cache/httpd"
set[:apache][:pid_file] = "/var/run/httpd/httpd.pid"
set[:apache][:lib_dir] = "/usr/lib/httpd"
+when "freebsd"
+ set[:apache][:package] = "apache22"
+ set[:apache][:dir] = "/usr/local/etc/apache22"
+ set[:apache][:log_dir] = "/var/log"
+ set[:apache][:root_group] = "wheel"
+ set[:apache][:user] = "www"
+ set[:apache][:group] = "www"
+ set[:apache][:binary] = "/usr/local/sbin/httpd"
+ set[:apache][:icondir] = "/usr/local/www/apache22/icons"
+ set[:apache][:cache_dir] = "/var/run/apache22"
+ set[:apache][:pid_file] = "/var/run/httpd.pid"
+ set[:apache][:lib_dir] = "/usr/local/libexec/apache22"
else
set[:apache][:dir] = "/etc/apache2"
set[:apache][:log_dir] = "/var/log/apache2"
@@ -101,3 +118,12 @@
default[:apache][:worker][:maxsparethreads] = 192
default[:apache][:worker][:threadsperchild] = 64
default[:apache][:worker][:maxrequestsperchild] = 0
+
+# Default modules to enable via include_recipe
+
+default['apache']['default_modules'] = %w{
+ status alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex
+ dir env mime negotiation setenvif
+}
+
+default['apache']['default_modules'] << "log_config" if node.platform?("redhat", "centos", "scientific", "fedora", "suse", "arch", "freebsd")
View
23 apache2/attributes/mod_auth_openid.rb
@@ -0,0 +1,23 @@
+#
+# Author:: Joshua Timberman <joshua@opscode.com>
+# Copyright:: Copyright (c) 2011, Opscode, Inc.
+# License:: Apache License, Version 2.0
+#
+# 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']['checksum'] = "79e7ca52511d1230"
+default['apache']['mod_auth_openid']['version'] = "0.6"
+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"
+default['apache']['mod_auth_openid']['configure_flags'] = []
View
3  apache2/definitions/apache_module.rb
@@ -21,6 +21,7 @@
include_recipe "apache2"
params[:filename] = params[:filename] || "mod_#{params[:name]}.so"
+ params[:module_path] = params[:module_path] || "#{node['apache']['lib_dir']}/modules/#{params[:filename]}"
if params[:conf]
apache_conf params[:name]
@@ -28,7 +29,7 @@
if platform?("redhat", "centos", "scientific", "fedora", "arch", "suse" )
file "#{node['apache']['dir']}/mods-available/#{params[:name]}.load" do
- content "LoadModule #{params[:name]}_module #{node['apache']['lib_dir']}/modules/#{params[:filename]}\n"
+ content "LoadModule #{params[:name]}_module #{params[:module_path]}\n"
mode 0644
end
end
View
2  apache2/definitions/web_app.rb
@@ -29,7 +29,7 @@
template "#{node[:apache][:dir]}/sites-available/#{application_name}.conf" do
source params[:template]
owner "root"
- group "root"
+ group node[:apache][:root_group]
mode 0644
if params[:cookbook]
cookbook params[:cookbook]
View
9 apache2/metadata.rb
@@ -3,7 +3,7 @@
license "Apache 2.0"
description "Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version "1.0.0"
+version "1.0.8"
recipe "apache2", "Main Apache configuration"
recipe "apache2::mod_alias", "Apache module 'alias' with config file"
recipe "apache2::mod_auth_basic", "Apache module 'auth_basic'"
@@ -42,7 +42,7 @@
recipe "apache2::mod_status", "Apache module 'status' with config file"
recipe "apache2::mod_xsendfile", "Apache module 'xsendfile'"
-%w{redhat centos scientific fedora debian ubuntu arch }.each do |os|
+%w{redhat centos scientific fedora debian ubuntu arch freebsd}.each do |os|
supports os
end
@@ -196,3 +196,8 @@
:display_name => "Apache Worker MPM MaxRequestsPerChild",
:description => "Maximum number of request a child process will handle",
:default => "0"
+
+attribute "apache/default_modules",
+ :display_name => "Apache Default Modules",
+ :description => "Default modules to enable via recipes",
+ :default => "status alias auth_basic authn_file authz_default authz_groupfile authz_host authz_user autoindex dir env mime negotiation setenvif"
View
113 apache2/recipes/default.rb
@@ -18,14 +18,7 @@
#
package "apache2" do
- case node[:platform]
- when "redhat","centos","scientific","fedora","suse"
- package_name "httpd"
- when "debian","ubuntu"
- package_name "apache2"
- when "arch"
- package_name "apache"
- end
+ package_name node[:apache][:package]
action :install
end
@@ -44,6 +37,8 @@
reload_command "/usr/sbin/invoke-rc.d apache2 reload && sleep 1"
when "arch"
service_name "httpd"
+ when "freebsd"
+ service_name "apache22"
end
supports value_for_platform(
"debian" => { "4.0" => [ :restart, :reload ], "default" => [ :restart, :reload, :status ] },
@@ -54,42 +49,38 @@
"fedora" => { "default" => [ :restart, :reload, :status ] },
"arch" => { "default" => [ :restart, :reload, :status ] },
"suse" => { "default" => [ :restart, :reload, :status ] },
+ "freebsd" => { "default" => [ :restart, :reload, :status ] },
"default" => { "default" => [:restart, :reload ] }
)
action :enable
end
-if platform?("redhat", "centos", "scientific", "fedora", "arch", "suse" )
+if platform?("redhat", "centos", "scientific", "fedora", "arch", "suse", "freebsd")
directory node[:apache][:log_dir] do
mode 0755
action :create
end
- package "perl"
+ package "perl" unless node['languages']['perl'].attribute?('version')
cookbook_file "/usr/local/bin/apache2_module_conf_generate.pl" do
source "apache2_module_conf_generate.pl"
mode 0755
- owner node[:apache][:user]
- group node[:apache][:group]
+ owner "root"
+ group node[:apache][:root_group]
end
%w{sites-available sites-enabled mods-available mods-enabled}.each do |dir|
directory "#{node[:apache][:dir]}/#{dir}" do
mode 0755
- owner node[:apache][:user]
- group node[:apache][:group]
+ owner "root"
+ group node[:apache][:root_group]
action :create
end
end
execute "generate-module-list" do
- if node[:kernel][:machine] == "x86_64"
- libdir = value_for_platform("arch" => { "default" => "lib" }, "default" => "lib64")
- else
- libdir = "lib"
- end
- command "/usr/local/bin/apache2_module_conf_generate.pl /usr/#{libdir}/httpd/modules /etc/httpd/mods-available"
+ command "/usr/local/bin/apache2_module_conf_generate.pl #{node[:apache][:lib_dir]} #{node[:apache][:dir]}/mods-available"
action :run
end
@@ -97,8 +88,8 @@
template "/usr/sbin/#{modscript}" do
source "#{modscript}.erb"
mode 0755
- owner node[:apache][:user]
- group node[:apache][:group]
+ owner "root"
+ group node[:apache][:root_group]
end
end
@@ -117,25 +108,48 @@
end
end
+if platform?("freebsd")
+ file "#{node[:apache][:dir]}/Includes/no-accf.conf" do
+ action :delete
+ backup false
+ end
+ directory "#{node[:apache][:dir]}/Includes" do
+ action :delete
+ end
+
+ %w{httpd-autoindex.conf httpd-dav.conf httpd-default.conf httpd-info.conf
+ httpd-languages.conf httpd-manual.conf httpd-mpm.conf
+ httpd-multilang-errordoc.conf httpd-ssl.conf httpd-userdir.conf
+ httpd-vhosts.conf}.each do |f|
+ file "#{node[:apache][:dir]}/extra/#{f}" do
+ action :delete
+ backup false
+ end
+ end
+ directory "#{node[:apache][:dir]}/extra" do
+ action :delete
+ end
+end
+
directory "#{node[:apache][:dir]}/ssl" do
action :create
mode 0755
- owner node[:apache][:user]
- group node[:apache][:group]
+ owner "root"
+ group node[:apache][:root_group]
end
directory "#{node[:apache][:dir]}/conf.d" do
action :create
mode 0755
- owner node[:apache][:user]
- group node[:apache][:group]
+ owner "root"
+ group node[:apache][:root_group]
end
directory node[:apache][:cache_dir] do
action :create
mode 0755
- owner node[:apache][:user]
- group node[:apache][:group]
+ owner "root"
+ group node[:apache][:root_group]
end
template "apache2.conf" do
@@ -144,10 +158,12 @@
path "#{node[:apache][:dir]}/conf/httpd.conf"
when "debian","ubuntu"
path "#{node[:apache][:dir]}/apache2.conf"
+ when "freebsd"
+ path "#{node[:apache][:dir]}/httpd.conf"
end
source "apache2.conf.erb"
- owner node[:apache][:user]
- group node[:apache][:group]
+ owner "root"
+ group node[:apache][:root_group]
mode 0644
notifies :restart, resources(:service => "apache2")
end
@@ -155,8 +171,8 @@
template "security" do
path "#{node[:apache][:dir]}/conf.d/security"
source "security.erb"
- owner node[:apache][:user]
- group node[:apache][:group]
+ owner "root"
+ group node[:apache][:root_group]
mode 0644
backup false
notifies :restart, resources(:service => "apache2")
@@ -165,8 +181,8 @@
template "charset" do
path "#{node[:apache][:dir]}/conf.d/charset"
source "charset.erb"
- owner node[:apache][:user]
- group node[:apache][:group]
+ owner "root"
+ group node[:apache][:root_group]
mode 0644
backup false
notifies :restart, resources(:service => "apache2")
@@ -174,36 +190,25 @@
template "#{node[:apache][:dir]}/ports.conf" do
source "ports.conf.erb"
- owner node[:apache][:user]
- group node[:apache][:group]
- variables :apache_listen_ports => node[:apache][:listen_ports]
+ owner "root"
+ group node[:apache][:root_group]
+ variables :apache_listen_ports => node[:apache][:listen_ports].map{|p| p.to_i}.uniq
mode 0644
notifies :restart, resources(:service => "apache2")
end
template "#{node[:apache][:dir]}/sites-available/default" do
source "default-site.erb"
- owner node[:apache][:user]
- group node[:apache][:group]
+ owner "root"
+ group node[:apache][:root_group]
mode 0644
notifies :restart, resources(:service => "apache2")
end
-include_recipe "apache2::mod_status"
-include_recipe "apache2::mod_alias"
-include_recipe "apache2::mod_auth_basic"
-include_recipe "apache2::mod_authn_file"
-include_recipe "apache2::mod_authz_default"
-include_recipe "apache2::mod_authz_groupfile"
-include_recipe "apache2::mod_authz_host"
-include_recipe "apache2::mod_authz_user"
-include_recipe "apache2::mod_autoindex"
-include_recipe "apache2::mod_dir"
-include_recipe "apache2::mod_env"
-include_recipe "apache2::mod_mime"
-include_recipe "apache2::mod_negotiation"
-include_recipe "apache2::mod_setenvif"
-include_recipe "apache2::mod_log_config" if platform?("redhat", "centos", "scientific", "fedora", "suse", "arch")
+node['apache']['default_modules'].each do |mod|
+ recipe_name = mod =~ /^mod_/ ? mod : "mod_#{mod}"
+ include_recipe "apache2::#{recipe_name}"
+end
apache_site "default" if platform?("redhat", "centos", "scientific", "fedora")
View
35 apache2/recipes/mod_auth_openid.rb
@@ -62,41 +62,46 @@
end
end
-remote_file "#{Chef::Config[:file_cache_path]}/mod_auth_openid-0.4.tar.gz" do
- source "http://butterfat.net/releases/mod_auth_openid/mod_auth_openid-0.4.tar.gz"
+_checksum = node['apache']['mod_auth_openid']['checksum']
+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 "http://butterfat.net/releases/mod_auth_openid/mod_auth_openid-#{version}.tar.gz"
mode 0644
+ checksum _checksum
end
bash "install mod_auth_openid" do
cwd Chef::Config[:file_cache_path]
code <<-EOH
- tar zxvf mod_auth_openid-0.4.tar.gz
- cd mod_auth_openid-0.4 && ./configure
+ tar zxvf mod_auth_openid-#{version}.tar.gz
+ cd mod_auth_openid-#{version} && ./configure #{configure_flags.join(' ')}
perl -pi -e "s/-i -a -n 'authopenid'/-i -n 'authopenid'/g" Makefile
make && make install
EOH
not_if { ::File.exists?("#{node[:apache][:lib_dir]}/modules/mod_auth_openid.so") }
end
-file "#{node[:apache][:cache_dir]}/mod_auth_openid.db" do
+directory node[:apache][:mod_auth_openid][:cache_dir] do
owner node[:apache][:user]
- mode 0640
+ group node[:apache][:group]
+ mode 0700
end
-template "#{node[:apache][:dir]}/mods-available/authopenid.load" do
- source "mods/authopenid.load.erb"
+file node[:apache][:mod_auth_openid][:dblocation] do
owner node[:apache][:user]
group node[:apache][:group]
mode 0644
end
-apache_module "authopenid" do
- filename "mod_auth_openid.so"
+template "#{node[:apache][:dir]}/mods-available/authopenid.load" do
+ source "mods/authopenid.load.erb"
+ owner "root"
+ group node[:apache][:root_group]
+ mode 0644
end
-template "/usr/local/bin/mod_auth_openid.rb" do
- source "mod_auth_openid.rb.erb"
- owner node[:apache][:user]
- group node[:apache][:user]
- mode 0750
+apache_module "authopenid" do
+ filename "mod_auth_openid.so"
end
View
2  apache2/recipes/mod_log_config.rb
@@ -17,7 +17,7 @@
# limitations under the License.
#
-if platform?("redhat", "centos", "scientific", "fedora", "suse", "arch")
+if platform?("redhat", "centos", "scientific", "fedora", "suse", "arch", "freebsd")
apache_module "log_config"
else
include_recipe "apache2"
View
2  apache2/recipes/mod_ssl.rb
@@ -33,7 +33,7 @@
template "#{node[:apache][:dir]}/ports.conf" do
source "ports.conf.erb"
- variables :apache_listen_ports => ports
+ variables :apache_listen_ports => ports.map{|p| p.to_i}.uniq
notifies :restart, resources(:service => "apache2")
mode 0644
end
View
4 apache2/templates/default/apache2.conf.erb
@@ -10,6 +10,8 @@ ServerRoot "<%= node[:apache][:dir] %>"
#
<% if node[:platform] == "debian" || node[:platform] == "ubuntu" -%>
LockFile /var/lock/apache2/accept.lock
+<% elsif node[:platform] == "freebsd" -%>
+LockFile /var/log/accept.lock
<% else %>
LockFile logs/accept.lock
<% end -%>
@@ -80,7 +82,7 @@ KeepAliveTimeout <%= node[:apache][:keepalivetimeout] %>
</IfModule>
User <%= node[:apache][:user] %>
-Group <%= node[:apache][:user] %>
+Group <%= node[:apache][:group] %>
#
# AccessFileName: The name of the file to look for in each directory
View
12 apache2/templates/default/mod_auth_openid.rb.erb
@@ -1,12 +0,0 @@
-#!/usr/bin/env ruby
-
-allowed_openids = Array.new
-<% node[:apache][:allowed_openids].each do |id| -%>
-allowed_openids << "<%= id %>"
-<% end -%>
-
-if allowed_openids.grep(ARGV[0]).length > 0
- exit 0
-else
- exit 1
-end
View
2  apache2/templates/default/mods/mime.conf.erb
@@ -7,6 +7,8 @@
<% case node[:platform] -%>
<% when "arch" -%>
TypesConfig <%= node['apache']['dir'] %>/conf/mime.types
+<% when "freebsd" -%>
+TypesConfig <%= node['apache']['dir'] %>/mime.types
<% else -%>
TypesConfig /etc/mime.types
<% end -%>
View
4 apache2/templates/default/mods/ssl.conf.erb
@@ -41,6 +41,8 @@ SSLPassPhraseDialog builtin
#SSLSessionCache dbm:/var/run/apache2/ssl_scache
<% if %w{ redhat centos scientific fedora }.include?(node[:platform]) -%>
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
+<% elsif node[:platform] == "freebsd" -%>
+SSLSessionCache shmcb:/var/run/ssl_scache(512000)
<% else -%>
SSLSessionCache shmcb:/var/run/apache2/ssl_scache
<% end -%>
@@ -51,6 +53,8 @@ SSLSessionCacheTimeout 300
# SSL engine uses internally for inter-process synchronization.
<% if %w{ redhat centos scientific fedora }.include?(node[:platform]) -%>
SSLMutex default
+<% elsif node[:platform] == "freebsd" -%>
+SSLMutex file:/var/run/ssl_mutex
<% else -%>
SSLMutex file:/var/run/apache2/ssl_mutex
<% end -%>
Please sign in to comment.
Something went wrong with that request. Please try again.