aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/websites
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/websites')
-rw-r--r--deployment/websites/files/maintenance.html13
-rw-r--r--deployment/websites/manifests/maintenance.pp22
-rw-r--r--deployment/websites/templates/vhost_maintenance.conf77
3 files changed, 112 insertions, 0 deletions
diff --git a/deployment/websites/files/maintenance.html b/deployment/websites/files/maintenance.html
new file mode 100644
index 00000000..5a2c3a7c
--- /dev/null
+++ b/deployment/websites/files/maintenance.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>Website under maintenance</title>
+ <link rel="stylesheet" href="css/site.css" type="text/css" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ </head>
+ <body>
+ Website under maintenance.
+ See <a href="http://blog.mageia.org/en/2013/05/03/planned-maintenance-on-mageia-servers-this-weekend/">this page</a> for more details.
+ </body>
+</html>
diff --git a/deployment/websites/manifests/maintenance.pp b/deployment/websites/manifests/maintenance.pp
new file mode 100644
index 00000000..0005c795
--- /dev/null
+++ b/deployment/websites/manifests/maintenance.pp
@@ -0,0 +1,22 @@
+class websites::maintenance {
+ $vhostdir = "$websites::base::webdatadir/maintenance"
+
+ file {$vhostdir:
+ ensure => 'directory',
+ mode => '0755',
+ owner => 'root',
+ group => 'root',
+ }
+
+ file {"$vhostdir/index.html":
+ ensure => 'present',
+ mode => '0644',
+ owner => 'root',
+ group => 'root',
+ source => 'puppet:///deployment/websites/maintenance.html',
+ }
+
+ apache::vhost::other_app { "maintenance.$::domain":
+ vhost_file => 'websites/vhost_maintenance.conf',
+ }
+}
diff --git a/deployment/websites/templates/vhost_maintenance.conf b/deployment/websites/templates/vhost_maintenance.conf
new file mode 100644
index 00000000..8debf4b4
--- /dev/null
+++ b/deployment/websites/templates/vhost_maintenance.conf
@@ -0,0 +1,77 @@
+<VirtualHost *:80>
+ ServerName maintenance.mageia.org
+ ServerAlias identity.mageia.org
+ ServerAlias identity-trunk.mageia.org
+ ServerAlias epoll.mageia.org
+ ServerAlias bugs.mageia.org
+ ServerAlias svnweb.mageia.org
+ ServerAlias xymon.mageia.org
+ ServerAlias check.mageia.org
+ ServerAlias wiki.mageia.org
+ ServerAlias gitweb.mageia.org
+ ServerAlias pkgcpan.mageia.org
+ ServerAlias perl.mageia.org
+ ServerAlias tmp.mageia.org
+ ServerAlias people.mageia.org
+ ServerAlias forums.mageia.org
+ ServerAlias forum.mageia.org
+
+ DocumentRoot <%= vhostdir %>
+ CustomLog /var/log/httpd/maintenanc_log combined
+ ErrorLog /var/log/httpd/error_maintenance_log
+
+ <Location />
+ Allow from all
+ </Location>
+
+ <Directory <%= vhostdir %>>
+ Order deny,allow
+ Allow from All
+ AllowOverride None
+ </Directory>
+
+ RewriteEngine On
+ RewriteRule .* <%= vhostdir %>/index.html [L]
+</VirtualHost>
+
+<VirtualHost *:443>
+ SSLEngine on
+ SSLCertificateFile /etc/ssl/wildcard.mageia.org.crt
+ SSLCertificateKeyFile /etc/ssl/wildcard.mageia.org.key
+ SSLCACertificateFile /etc/ssl/wildcard.mageia.org.pem
+ SSLVerifyClient None
+
+ ServerName maintenance.mageia.org
+ ServerAlias identity.mageia.org
+ ServerAlias identity-trunk.mageia.org
+ ServerAlias epoll.mageia.org
+ ServerAlias bugs.mageia.org
+ ServerAlias svnweb.mageia.org
+ ServerAlias xymon.mageia.org
+ ServerAlias check.mageia.org
+ ServerAlias wiki.mageia.org
+ ServerAlias gitweb.mageia.org
+ ServerAlias pkgcpan.mageia.org
+ ServerAlias perl.mageia.org
+ ServerAlias tmp.mageia.org
+ ServerAlias people.mageia.org
+ ServerAlias forums.mageia.org
+ ServerAlias forum.mageia.org
+
+ DocumentRoot <%= vhostdir %>
+ CustomLog /var/log/httpd/maintenanc_log combined
+ ErrorLog /var/log/httpd/error_maintenance_log
+
+ <Location />
+ Allow from all
+ </Location>
+
+ <Directory <%= vhostdir %>>
+ Order deny,allow
+ Allow from All
+ AllowOverride None
+ </Directory>
+
+ RewriteEngine On
+ RewriteRule .* <%= vhostdir %>/index.html [L]
+</VirtualHost>