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':
93 source => 'puppet:///modules/apache2/pratchett',
96 apache2::module { 'mpm_event': ensure => absent }
97 if has_role('apache_prefork') {
98 apache2::module { 'mpm_worker': ensure => absent }
99 apache2::module { 'mpm_prefork': }
101 apache2::module { 'mpm_prefork': ensure => absent }
102 apache2::module { 'mpm_worker': }
104 if $::lsbmajdistrelease > 7 {
105 file { '/etc/apache2/mods-available/mpm_worker.conf':
106 content => template('apache2/mpm_worker.erb'),
110 file { '/etc/apache2/sites-available/common-ssl.inc':
114 file { '/etc/logrotate.d/apache2':
115 source => 'puppet:///modules/apache2/apache2.logrotate',
118 file { [ '/srv/www', '/srv/www/default.debian.org', '/srv/www/default.debian.org/htdocs', '/srv/www/default.debian.org/htdocs-disabled' ]:
123 file { '/srv/www/default.debian.org/htdocs/index.html':
124 content => template('apache2/default-index.html'),
127 file { '/srv/www/default.debian.org/htdocs-disabled/index.html':
128 content => template('apache2/disabled-index.html'),
131 file { '/var/log/apache2/.nobackup':
136 munin::check { 'apache_accesses': }
137 munin::check { 'apache_processes': }
138 munin::check { 'apache_volume': }
139 munin::check { 'apache_servers': }
140 munin::check { 'ps_apache2':
143 # The munin script needs this
144 package { 'libwww-perl':
148 if $::hostname in [beach,buxtehude,picconi,pkgmirror-csail] {
149 include apache2::dynamic
151 @ferm::rule { 'dsa-http':
153 description => 'Allow web access',
154 rule => '&SERVICE(tcp, (http https))'
158 @ferm::rule { 'dsa-http-v6':
161 description => 'Allow web access',
162 rule => '&SERVICE(tcp, (http https))'
165 exec { 'service apache2 reload':
166 path => '/usr/bin:/usr/sbin:/bin:/sbin',
167 command => 'service apache2 reload',
169 require => Package['apache2'],
172 apache2::config { 'puppet-ssl-key-pins':
173 content => template('apache2/ssl-key-pins.erb'),
174 notify => Exec['service apache2 reload'],