Created
July 7, 2009 23:25
-
-
Save caryp/142444 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuring Apache Multi-Processing Module | |
case node[:platform] | |
when "centos","redhat","fedora","suse" | |
binary_to_use = @node[:apache][:binary] | |
if @node[:apache][:mpm] != 'prefork' | |
binary_to_use << ".worker" | |
end | |
template "centos_sysconfig_httpd" do | |
source "sysconfig_httpd.erb" | |
mode "0644" | |
variables({ | |
:sysconfig_httpd => binary_to_use | |
}) | |
notifies :reload, resources(:service => "apache") | |
end | |
when "debian","ubuntu" | |
package "apache2-mpm-prefork" do | |
only_if do @node[:apache][:mpm] == 'prefork' end | |
end | |
package "apache2-mpm-worker" do | |
only_if do @node[:apache][:mpm] != 'prefork' end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration file for the httpd service. | |
# | |
# The default processing model (MPM) is the process-based | |
# 'prefork' model. A thread-based model, 'worker', is also | |
# available, but does not work with some modules (such as PHP). | |
# The service must be stopped before changing this variable. | |
# | |
#HTTPD=/usr/sbin/httpd.worker | |
HTTPD=<%= @sysconfig_httpd %> | |
# | |
# To pass additional options (for instance, -D definitions) to the | |
# httpd binary at startup, set OPTIONS here. | |
# | |
#OPTIONS= | |
# | |
# By default, the httpd process is started in the C locale; to | |
# change the locale in which the server runs, the HTTPD_LANG | |
# variable can be set. | |
# | |
#HTTPD_LANG=C |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment