apache: Add option to set the MaxClients directive
This commit is contained in:
parent
a509469be1
commit
85a37f8624
4 changed files with 11 additions and 7 deletions
|
@ -23,6 +23,10 @@ class apache::common {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ! $apache_maxclients {
|
||||||
|
$apache_maxclients = "256"
|
||||||
|
}
|
||||||
|
|
||||||
if $apache_datadir {
|
if $apache_datadir {
|
||||||
file { $apache_datadir:
|
file { $apache_datadir:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
|
@ -227,7 +231,7 @@ define apache::site($aliases="", $root="", $redirect="", $proxy="") {
|
||||||
class apache::sslserver inherits apache::common {
|
class apache::sslserver inherits apache::common {
|
||||||
|
|
||||||
include user::system
|
include user::system
|
||||||
|
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
"debian","ubuntu": {
|
"debian","ubuntu": {
|
||||||
include apache::debian::sslserver
|
include apache::debian::sslserver
|
||||||
|
|
|
@ -104,8 +104,8 @@ KeepAliveTimeout 15
|
||||||
StartServers 8
|
StartServers 8
|
||||||
MinSpareServers 5
|
MinSpareServers 5
|
||||||
MaxSpareServers 20
|
MaxSpareServers 20
|
||||||
ServerLimit 256
|
ServerLimit <%= @apache_maxclients %>
|
||||||
MaxClients 256
|
MaxClients <%= @apache_maxclients %>
|
||||||
MaxRequestsPerChild 4000
|
MaxRequestsPerChild 4000
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
|
|
@ -103,8 +103,8 @@ KeepAliveTimeout 15
|
||||||
StartServers 8
|
StartServers 8
|
||||||
MinSpareServers 5
|
MinSpareServers 5
|
||||||
MaxSpareServers 20
|
MaxSpareServers 20
|
||||||
ServerLimit 256
|
ServerLimit <%= @apache_maxclients %>
|
||||||
MaxClients 256
|
MaxClients <%= @apache_maxclients %>
|
||||||
MaxRequestsPerChild 4000
|
MaxRequestsPerChild 4000
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
|
|
@ -103,8 +103,8 @@ KeepAliveTimeout 15
|
||||||
StartServers 8
|
StartServers 8
|
||||||
MinSpareServers 5
|
MinSpareServers 5
|
||||||
MaxSpareServers 20
|
MaxSpareServers 20
|
||||||
ServerLimit 256
|
ServerLimit <%= @apache_maxclients %>
|
||||||
MaxClients 256
|
MaxClients <%= @apache_maxclients %>
|
||||||
MaxRequestsPerChild 4000
|
MaxRequestsPerChild 4000
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue