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':
43 $memlimit = 512 * 1024 * 1024
44 } elsif has_role('dgit_git') {
45 $memlimit = 512 * 1024 * 1024
46 } elsif has_role('sso') {
47 $memlimit = 512 * 1024 * 1024
48 } elsif has_role('popcon') {
49 $memlimit = 512 * 1024 * 1024
50 } elsif has_role('qamaster') {
51 $memlimit = 300 * 1024 * 1024
53 $memlimit = 192 * 1024 * 1024
56 apache2::config { 'resource-limits':
57 content => template('apache2/resource-limits.erb'),
60 apache2::config { 'security':
61 source => 'puppet:///modules/apache2/security',
64 apache2::config { 'logformat-privacy':
65 source => 'puppet:///modules/apache2/logformat-privacy',
68 apache2::config { 'local-serverinfo':
69 source => 'puppet:///modules/apache2/local-serverinfo',
72 apache2::config { 'server-status':
73 source => 'puppet:///modules/apache2/server-status',
76 apache2::config { 'puppet-ssl-macros':
77 source => 'puppet:///modules/apache2/puppet-ssl-macros',
80 apache2::config { 'puppet-ftp-macros':
81 source => 'puppet:///modules/apache2/puppet-ftp-macros',
84 apache2::config { 'puppet-config':
85 content => template('apache2/puppet-config.erb'),
88 apache2::config { 'pratchett':
92 apache2::config { 'headers':
93 source => 'puppet:///modules/apache2/headers',
96 apache2::config { 'disabled-service':
97 source => 'puppet:///modules/apache2/disabled-service',
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':
139 file { '/var/log/apache2/.nobackup':
144 munin::check { 'apache_accesses': }
145 munin::check { 'apache_processes': }
146 munin::check { 'apache_volume': }
147 munin::check { 'apache_servers': }
148 munin::check { 'ps_apache2':
151 # The munin script needs this
152 package { 'libwww-perl':
156 if (! has_role('apache_not_public')) {
157 if has_role('apache_ratelimited') {
158 include apache2::dynamic
160 @ferm::rule { 'dsa-http':
162 description => 'Allow web access',
163 rule => '&SERVICE(tcp, (http https))'
167 @ferm::rule { 'dsa-http-v6':
170 description => 'Allow web access',
171 rule => '&SERVICE(tcp, (http https))'
175 exec { 'service apache2 reload':
176 path => '/usr/bin:/usr/sbin:/bin:/sbin',
177 command => 'service apache2 reload',
179 require => Package['apache2'],
182 apache2::config { 'puppet-ssl-key-pins':
183 content => template('apache2/ssl-key-pins.erb'),
184 notify => Exec['service apache2 reload'],
187 file { '/etc/cron.d/puppet-export-scheduled-shutdown': ensure => absent, }
188 concat::fragment { 'dsa-puppet-stuff--apache-export-shutdown':
189 target => '/etc/cron.d/dsa-puppet-stuff',
191 */2 * * * * root mkdir -p /run/dsa/shutdown-marker; if dsa-is-shutdown-scheduled; then echo 'system-in-shutdown' > /run/dsa/shutdown-marker/shutdown-in-progress; else rm -f /run/dsa/shutdown-marker/shutdown-in-progress; fi
194 apache2::config { 'local-scheduled-shutdown':
195 source => 'puppet:///modules/apache2/local-scheduled-shutdown',