Factor out the config into an apache2 macro.
Make the 503 error message more generic so it can be used anywhere.
--- /dev/null
+<IfModule mod_macro.c>
+ <Macro common-disabled-service>
+ <IfModule mod_userdir.c>
+ UserDir disabled
+ </IfModule>
+ DocumentRoot /srv/static.debian.org/puppet/disabled-service
+ <Directory /srv/static.debian.org/puppet/disabled-service>
+ AllowOverride FileInfo Indexes Options=Multiviews
+ Options Indexes SymLinksIfOwnerMatch
+ Require all granted
+ </Directory>
+ RedirectMatch 503 ^/(?!503\.html)
+ ErrorDocument 503 /503.html
+ <IfModule mod_headers.c>
+ Header always set Retry-After "18000"
+ </IfModule>
+ </Macro>
+</IfModule>
source => 'puppet:///modules/apache2/headers',
}
+ apache2::config { 'disabled-service':
+ source => 'puppet:///modules/apache2/disabled-service',
+ }
+
apache2::module { 'mpm_event': ensure => absent }
if has_role('apache_prefork') {
apache2::module { 'mpm_worker': ensure => absent }
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
- <TITLE>Welcome to archive.debian.net!</TITLE>
-</HEAD>
-<BODY>
-
-<H1>Welcome to archive.debian.net!</H1>
-
-Unfortunately, this service is not available at this time. It is not
-known when its maintainer will be able to provide it again.
-
-<p>
-This service is <b>not</b> provided by the Debian System Administration team
-but instead by an individual member of the Debian project.
-<p>
-<i>Please do not contact the DSA team with questions about this service.</i>
-
-<p>
-<font size="-1">(If you are the maintainer of this service, please do contact
-the DSA team if you need help restoring the service.)</font>
-
-<P>
-<HR NOSHADE />
-<FONT size="-1">Debian System Administration team</FONT>
-
-</BODY>
-</HTML>
--- /dev/null
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+ <TITLE>Service disabled!</TITLE>
+</HEAD>
+<BODY>
+
+<H1>Service disabled!</H1>
+
+Unfortunately, this service is not available at this time. It is not
+known when its maintainer will be able to provide it again.
+
+<p>
+This service is <b>not</b> provided by the Debian System Administration team
+but instead by an individual member of the Debian project.
+<p>
+<i>Please do not contact the DSA team with questions about this service.</i>
+
+<p>
+<font size="-1">(If you are the maintainer of this service, please do contact
+the DSA team if you need help restoring the service.)</font>
+
+<P>
+<HR NOSHADE />
+<FONT size="-1">Debian System Administration team</FONT>
+
+</BODY>
+</HTML>
onion::service { 'planet.debian.org' : ensure => "ifstatic", port => 80, target_port => 80, target_address => $onion_v4_addr }
}
- ssl::service { 'archive.debian.net': ensure => present, notify => Exec['service apache2 reload'], key => true, }
file { '/srv/static.debian.org/puppet':
ensure => directory,
mode => '02755'
}
- file { '/srv/static.debian.org/puppet/archive.debian.net':
+ file { '/srv/static.debian.org/puppet/disabled-service':
ensure => directory,
mode => '02755'
}
+ file { '/srv/static.debian.org/puppet/disabled-service/503.html':
+ source => 'puppet:///modules/roles/static-htdocs/disabled-service/503.html',
+ }
+
+ ssl::service { 'archive.debian.net': ensure => present, notify => Exec['service apache2 reload'], key => true, }
+ file { '/srv/static.debian.org/puppet/archive.debian.net':
+ ensure => absent,
+ }
file { '/srv/static.debian.org/puppet/archive.debian.net/503.html':
- source => 'puppet:///modules/roles/static-htdocs/archive.debian.net/503.html',
+ ensure => absent,
}
}
ServerAdmin debian-admin@debian.org
ErrorLog /var/log/apache2/archive.debian.net-error.log
CustomLog /var/log/apache2/archive.debian.net-access.log privacyssl
-
Use common-debian-service-ssl archive.debian.net
Use common-ssl-HSTS
-
- <IfModule mod_userdir.c>
- UserDir disabled
- </IfModule>
- ServerSignature On
-
- DocumentRoot /srv/static.debian.org/puppet/archive.debian.net
- <Directory /srv/static.debian.org/puppet/archive.debian.net>
- AllowOverride FileInfo Indexes Options=Multiviews
- Options Indexes SymLinksIfOwnerMatch
- Require all granted
- </Directory>
-
- RedirectMatch 503 ^/(?!503\.html)
- ErrorDocument 503 /503.html
- Header always set Retry-After "18000"
+ Use common-disabled-service
</VirtualHost>