Skip to content

Commit

Permalink
turning MaxKeepAliveRequests into a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
attachmentgenie committed Apr 22, 2014
1 parent 6218140 commit a6f92a9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
$group = $::apache::params::group,
$keepalive = $::apache::params::keepalive,
$keepalive_timeout = $::apache::params::keepalive_timeout,
$maxkeepaliverequests = $apache::params::maxkeepaliverequests,
$logroot = $::apache::params::logroot,
$log_level = $::apache::params::log_level,
$log_formats = {},
Expand Down Expand Up @@ -270,6 +271,7 @@
# - $apxs_workaround
# - $keepalive
# - $keepalive_timeout
# - $maxkeepaliverequests
# - $server_root
# - $server_tokens
# - $server_signature
Expand Down
3 changes: 3 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
$conf_template = 'apache/httpd.conf.erb'
$keepalive = 'Off'
$keepalive_timeout = 15
$maxkeepaliverequests = 100
$fastcgi_lib_path = undef
$mime_support_package = 'mailcap'
$mime_types_config = '/etc/mime.types'
Expand Down Expand Up @@ -141,6 +142,7 @@
$conf_template = 'apache/httpd.conf.erb'
$keepalive = 'Off'
$keepalive_timeout = 15
$maxkeepaliverequests = 100
$fastcgi_lib_path = '/var/lib/apache2/fastcgi'
$mime_support_package = 'mime-support'
$mime_types_config = '/etc/mime.types'
Expand Down Expand Up @@ -199,6 +201,7 @@
$conf_template = 'apache/httpd.conf.erb'
$keepalive = 'Off'
$keepalive_timeout = 15
$maxkeepaliverequests = 100
$fastcgi_lib_path = undef # TODO: revisit
$mime_support_package = 'misc/mime-support'
$mime_types_config = '/usr/local/etc/mime.types'
Expand Down
3 changes: 2 additions & 1 deletion spec/acceptance/apache_parameters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class { 'apache':
describe 'keepalive' do
describe 'setup' do
it 'applies cleanly' do
pp = "class { 'apache': keepalive => 'On', keepalive_timeout => '30' }"
pp = "class { 'apache': keepalive => 'On', keepalive_timeout => '30', maxkeepaliverequests => '200' }"
apply_manifest(pp, :catch_failures => true)
end
end
Expand All @@ -321,6 +321,7 @@ class { 'apache':
it { should be_file }
it { should contain 'KeepAlive On' }
it { should contain 'KeepAliveTimeout 30' }
it { should contain 'MaxKeepAliveRequests 200' }
end
end

Expand Down
2 changes: 1 addition & 1 deletion templates/httpd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ServerRoot "<%= @server_root %>"
PidFile <%= @pidfile %>
Timeout <%= @timeout %>
KeepAlive <%= @keepalive %>
MaxKeepAliveRequests 100
MaxKeepAliveRequests <%= @maxkeepaliverequests %>
KeepAliveTimeout <%= @keepalive_timeout %>

User <%= @user %>
Expand Down

0 comments on commit a6f92a9

Please sign in to comment.