1 class apache::mod::prefork (
3 $minspareservers = '5',
4 $maxspareservers = '20',
7 $maxrequestsperchild = '4000',
8 $apache_version = $::apache::apache_version,
10 if defined(Class['apache::mod::event']) {
11 fail('May not include both apache::mod::prefork and apache::mod::event on the same node')
13 if versioncmp($apache_version, '2.4') < 0 {
14 if defined(Class['apache::mod::itk']) {
15 fail('May not include both apache::mod::prefork and apache::mod::itk on the same node')
18 if defined(Class['apache::mod::peruser']) {
19 fail('May not include both apache::mod::prefork and apache::mod::peruser on the same node')
21 if defined(Class['apache::mod::worker']) {
22 fail('May not include both apache::mod::prefork and apache::mod::worker on the same node')
26 group => $::apache::params::root_group,
36 # - $maxrequestsperchild
37 file { "${::apache::mod_dir}/prefork.conf":
39 content => template('apache/mod/prefork.conf.erb'),
40 require => Exec["mkdir ${::apache::mod_dir}"],
41 before => File[$::apache::mod_dir],
42 notify => Class['apache::service'],
47 if versioncmp($apache_version, '2.4') >= 0 {
48 ::apache::mpm{ 'prefork':
49 apache_version => $apache_version,
53 file_line { '/etc/sysconfig/httpd prefork enable':
55 path => '/etc/sysconfig/httpd',
56 line => '#HTTPD=/usr/sbin/httpd.worker',
57 match => '#?HTTPD=/usr/sbin/httpd.worker',
58 require => Package['httpd'],
59 notify => Class['apache::service'],
63 'debian', 'freebsd', 'Suse' : {
64 ::apache::mpm{ 'prefork':
65 apache_version => $apache_version,
69 ::portage::makeconf { 'apache2_mpms':
74 fail("Unsupported osfamily ${::osfamily}")