3 # Standard apache config debian.org hosts
16 require => Package['apache2'],
19 apache2::module { 'reqtimeout': }
20 apache2::module { 'info': }
21 apache2::module { 'status': }
22 apache2::module { 'headers': }
23 apache2::module { 'macro': }
25 apache2::site { '00-default':
26 site => 'default-debian.org',
27 content => template('apache2/default-debian.org.erb'),
29 apache2::site { 'xx-default-ssl':
30 site => 'default-debian.org-ssl',
31 content => template('apache2/default-debian.org-ssl.erb'),
34 apache2::site { '000-default':
38 apache2::config { 'serve-cgi-bin':
42 apache2::config { 'ressource-limits':
47 $memlimit = 512 * 1024 * 1024
48 } elsif has_role('dgit_git') {
49 $memlimit = 512 * 1024 * 1024
50 } elsif has_role('sso') {
51 $memlimit = 512 * 1024 * 1024
52 } elsif has_role('popcon') {
53 $memlimit = 512 * 1024 * 1024
54 } elsif has_role('qamaster') {
55 $memlimit = 300 * 1024 * 1024
57 $memlimit = 192 * 1024 * 1024
60 apache2::config { 'resource-limits':
61 content => template('apache2/resource-limits.erb'),
64 apache2::config { 'security':
65 source => 'puppet:///modules/apache2/security',
68 apache2::config { 'logformat-privacy':
69 source => 'puppet:///modules/apache2/logformat-privacy',
72 apache2::config { 'local-serverinfo':
73 source => 'puppet:///modules/apache2/local-serverinfo',
76 apache2::config { 'server-status':
77 source => 'puppet:///modules/apache2/server-status',
80 apache2::config { 'puppet-ssl-macros':
81 source => 'puppet:///modules/apache2/puppet-ssl-macros',
84 apache2::config { 'puppet-ftp-macros':
85 source => 'puppet:///modules/apache2/puppet-ftp-macros',
88 apache2::config { 'puppet-config':
89 content => template('apache2/puppet-config.erb'),
92 apache2::config { 'pratchett':
96 apache2::config { 'headers':
97 source => 'puppet:///modules/apache2/headers',
100 apache2::config { 'disabled-service':
101 source => 'puppet:///modules/apache2/disabled-service',
104 apache2::module { 'mpm_event': ensure => absent }
105 if has_role('apache_prefork') {
106 apache2::module { 'mpm_worker': ensure => absent }
107 apache2::module { 'mpm_prefork': }
109 apache2::module { 'mpm_prefork': ensure => absent }
110 apache2::module { 'mpm_worker': }
112 if versioncmp($::lsbmajdistrelease, '7') > 0 {
113 file { '/etc/apache2/mods-available/mpm_worker.conf':
114 content => template('apache2/mpm_worker.erb'),
118 file { '/etc/apache2/sites-available/common-ssl.inc':
122 file { '/etc/logrotate.d/apache2':
123 source => 'puppet:///modules/apache2/apache2.logrotate',
126 file { [ '/srv/www', '/srv/www/default.debian.org', '/srv/www/default.debian.org/htdocs', '/srv/www/default.debian.org/htdocs-disabled' ]:
131 file { '/srv/www/default.debian.org/htdocs/index.html':
132 content => template('apache2/default-index.html'),
135 file { '/srv/www/default.debian.org/htdocs-disabled/index.html':
136 content => template('apache2/disabled-index.html'),
139 file { '/var/log/apache2':
143 file { '/var/log/apache2/.nobackup':
148 munin::check { 'apache_accesses': }
149 munin::check { 'apache_processes': }
150 munin::check { 'apache_volume': }
151 munin::check { 'apache_servers': }
152 munin::check { 'ps_apache2':
155 # The munin script needs this
156 package { 'libwww-perl':
160 if $::hostname in [beach,buxtehude,picconi,pkgmirror-csail] {
161 include apache2::dynamic
163 @ferm::rule { 'dsa-http':
165 description => 'Allow web access',
166 rule => '&SERVICE(tcp, (http https))'
170 @ferm::rule { 'dsa-http-v6':
173 description => 'Allow web access',
174 rule => '&SERVICE(tcp, (http https))'
177 exec { 'service apache2 reload':
178 path => '/usr/bin:/usr/sbin:/bin:/sbin',
179 command => 'service apache2 reload',
181 require => Package['apache2'],
184 apache2::config { 'puppet-ssl-key-pins':
185 content => template('apache2/ssl-key-pins.erb'),
186 notify => Exec['service apache2 reload'],
189 file { '/etc/cron.d/puppet-export-scheduled-shutdown':
190 source => 'puppet:///modules/apache2/cron-export-scheduled-shutdown',
192 apache2::config { 'local-scheduled-shutdown':
193 source => 'puppet:///modules/apache2/local-scheduled-shutdown',