1 class apache::mod::worker (
4 $minsparethreads = '25',
5 $maxsparethreads = '75',
6 $threadsperchild = '25',
7 $maxrequestsperchild = '0',
10 $apache_version = $::apache::apache_version,
12 if defined(Class['apache::mod::event']) {
13 fail('May not include both apache::mod::worker and apache::mod::event on the same node')
15 if defined(Class['apache::mod::itk']) {
16 fail('May not include both apache::mod::worker and apache::mod::itk on the same node')
18 if defined(Class['apache::mod::peruser']) {
19 fail('May not include both apache::mod::worker and apache::mod::peruser on the same node')
21 if defined(Class['apache::mod::prefork']) {
22 fail('May not include both apache::mod::worker and apache::mod::prefork on the same node')
26 group => $::apache::params::root_group,
36 # - $maxrequestsperchild
39 file { "${::apache::mod_dir}/worker.conf":
41 content => template('apache/mod/worker.conf.erb'),
42 require => Exec["mkdir ${::apache::mod_dir}"],
43 before => File[$::apache::mod_dir],
44 notify => Class['apache::service'],
49 if versioncmp($apache_version, '2.4') >= 0 {
50 ::apache::mpm{ 'worker':
51 apache_version => $apache_version,
55 file_line { '/etc/sysconfig/httpd worker enable':
57 path => '/etc/sysconfig/httpd',
58 line => 'HTTPD=/usr/sbin/httpd.worker',
59 match => '#?HTTPD=/usr/sbin/httpd.worker',
60 require => Package['httpd'],
61 notify => Class['apache::service'],
65 'debian', 'freebsd', 'Suse': {
66 ::apache::mpm{ 'worker':
67 apache_version => $apache_version,
71 ::portage::makeconf { 'apache2_mpms':
76 fail("Unsupported osfamily ${::osfamily}")