3 # Standard apache config debian.org hosts
18 require => Package['apache2'],
21 apache2::module { 'reqtimeout': }
22 apache2::module { 'info': }
23 apache2::module { 'status': }
24 apache2::module { 'headers': }
25 apache2::module { 'macro': }
27 apache2::site { '00-default':
28 site => 'default-debian.org',
29 content => template('apache2/default-debian.org.erb'),
31 apache2::site { 'xx-default-ssl':
32 site => 'default-debian.org-ssl',
33 content => template('apache2/default-debian.org-ssl.erb'),
36 apache2::site { '000-default':
40 apache2::config { 'serve-cgi-bin':
45 $memlimit = 512 * 1024 * 1024
46 } elsif has_role('dgit_git') {
47 $memlimit = 512 * 1024 * 1024
48 } elsif has_role('sso') {
49 $memlimit = 512 * 1024 * 1024
50 } elsif has_role('popcon') {
51 $memlimit = 512 * 1024 * 1024
52 } elsif has_role('qamaster') {
53 $memlimit = 300 * 1024 * 1024
55 $memlimit = 192 * 1024 * 1024
58 apache2::config { 'resource-limits':
59 content => template('apache2/resource-limits.erb'),
62 apache2::config { 'security':
63 source => 'puppet:///modules/apache2/security',
66 apache2::config { 'logformat-privacy':
67 source => 'puppet:///modules/apache2/logformat-privacy',
70 apache2::config { 'local-serverinfo':
71 source => 'puppet:///modules/apache2/local-serverinfo',
74 apache2::config { 'server-status':
75 source => 'puppet:///modules/apache2/server-status',
78 apache2::config { 'puppet-ssl-macros':
79 source => 'puppet:///modules/apache2/puppet-ssl-macros',
82 apache2::config { 'puppet-ftp-macros':
83 source => 'puppet:///modules/apache2/puppet-ftp-macros',
86 apache2::config { 'puppet-config':
87 content => template('apache2/puppet-config.erb'),
90 apache2::config { 'pratchett':
94 apache2::config { 'headers':
95 source => 'puppet:///modules/apache2/headers',
98 apache2::config { 'disabled-service':
99 source => 'puppet:///modules/apache2/disabled-service',
102 apache2::module { 'mpm_event': ensure => absent }
103 if has_role('apache_prefork') {
104 apache2::module { 'mpm_worker': ensure => absent }
105 apache2::module { 'mpm_prefork': }
107 apache2::module { 'mpm_prefork': ensure => absent }
108 apache2::module { 'mpm_worker': }
110 file { '/etc/apache2/mods-available/mpm_worker.conf':
111 content => template('apache2/mpm_worker.erb'),
114 file { '/etc/apache2/sites-available/common-ssl.inc':
118 file { '/etc/logrotate.d/apache2':
119 source => 'puppet:///modules/apache2/apache2.logrotate',
122 file { '/var/log/apache2':
126 file { '/var/log/apache2/.nobackup':
131 munin::check { 'apache_accesses': }
132 munin::check { 'apache_processes': }
133 munin::check { 'apache_volume': }
134 munin::check { 'apache_servers': }
135 munin::check { 'ps_apache2':
138 # The munin script needs this
139 package { 'libwww-perl':
143 if (! has_role('apache_not_public')) {
144 if has_role('apache_ratelimited') {
145 include apache2::dynamic
147 @ferm::rule { 'dsa-http':
149 description => 'Allow web access',
150 rule => '&SERVICE(tcp, (http https))'
153 @ferm::rule { 'dsa-http-v6':
156 description => 'Allow web access',
157 rule => '&SERVICE(tcp, (http https))'
162 exec { 'service apache2 reload':
163 path => '/usr/bin:/usr/sbin:/bin:/sbin',
164 command => 'service apache2 reload',
166 require => Package['apache2'],
169 apache2::config { 'puppet-ssl-key-pins':
170 content => template('apache2/ssl-key-pins.erb'),
171 notify => Exec['service apache2 reload'],
174 apache2::config { 'local-scheduled-shutdown':
175 source => 'puppet:///modules/apache2/local-scheduled-shutdown',