1 |
class apache::base { |
2 |
|
3 |
# number of time the log file are rotated before being removed |
4 |
$httpdlogs_rotate = '24' |
5 |
|
6 |
$apache_user = 'apache' |
7 |
$apache_group = 'apache' |
8 |
|
9 |
package { 'apache-mpm-prefork': |
10 |
alias => 'apache', |
11 |
} |
12 |
|
13 |
package { 'apache-conf': } |
14 |
|
15 |
service { 'httpd': |
16 |
alias => 'apache', |
17 |
subscribe => [ Package['apache-mpm-prefork'] ], |
18 |
} |
19 |
|
20 |
exec { 'service httpd configtest': |
21 |
refreshonly => true, |
22 |
notify => Service['apache'], |
23 |
} |
24 |
|
25 |
apache::config { |
26 |
'/etc/httpd/conf.d/customization.conf': |
27 |
content => template('apache/customization.conf'); |
28 |
'/etc/httpd/conf/vhosts.d/00_default_vhosts.conf': |
29 |
content => template('apache/00_default_vhosts.conf'); |
30 |
} |
31 |
|
32 |
file { '/etc/logrotate.d/httpd': |
33 |
content => template('apache/logrotate') |
34 |
} |
35 |
} |