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::module { 'mpm_event': ensure => absent }
101 if has_role('apache_prefork') {
102 apache2::module { 'mpm_worker': ensure => absent }
103 apache2::module { 'mpm_prefork': }
105 apache2::module { 'mpm_prefork': ensure => absent }
106 apache2::module { 'mpm_worker': }
108 if versioncmp($::lsbmajdistrelease, '7') > 0 {
109 file { '/etc/apache2/mods-available/mpm_worker.conf':
110 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 { [ '/srv/www', '/srv/www/default.debian.org', '/srv/www/default.debian.org/htdocs', '/srv/www/default.debian.org/htdocs-disabled' ]:
127 file { '/srv/www/default.debian.org/htdocs/index.html':
128 content => template('apache2/default-index.html'),
131 file { '/srv/www/default.debian.org/htdocs-disabled/index.html':
132 content => template('apache2/disabled-index.html'),
135 file { '/var/log/apache2/.nobackup':
140 munin::check { 'apache_accesses': }
141 munin::check { 'apache_processes': }
142 munin::check { 'apache_volume': }
143 munin::check { 'apache_servers': }
144 munin::check { 'ps_apache2':
147 # The munin script needs this
148 package { 'libwww-perl':
152 if $::hostname in [beach,buxtehude,picconi,pkgmirror-csail] {
153 include apache2::dynamic
155 @ferm::rule { 'dsa-http':
157 description => 'Allow web access',
158 rule => '&SERVICE(tcp, (http https))'
162 @ferm::rule { 'dsa-http-v6':
165 description => 'Allow web access',
166 rule => '&SERVICE(tcp, (http https))'
169 exec { 'service apache2 reload':
170 path => '/usr/bin:/usr/sbin:/bin:/sbin',
171 command => 'service apache2 reload',
173 require => Package['apache2'],
176 apache2::config { 'puppet-ssl-key-pins':
177 content => template('apache2/ssl-key-pins.erb'),
178 notify => Exec['service apache2 reload'],