From 72b1cf7b2f3b0c687e53384f34d46719502e2966 Mon Sep 17 00:00:00 2001 From: Julien Cristau Date: Sun, 13 Jan 2019 23:51:35 +0100 Subject: [PATCH] Add wiki.debconf.org static vhost (RT#7595) --- modules/roles/manifests/static_mirror.pp | 1 + .../vhost/static-vhosts-simple.erb | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/modules/roles/manifests/static_mirror.pp b/modules/roles/manifests/static_mirror.pp index cb653d0e0..00fcc9a84 100644 --- a/modules/roles/manifests/static_mirror.pp +++ b/modules/roles/manifests/static_mirror.pp @@ -156,6 +156,7 @@ class roles::static_mirror { ssl::service { 'fr.debconf.org' : ensure => "ifstatic", notify => Exec['service apache2 reload'], key => true, } ssl::service { 'miniconf10.debconf.org' : ensure => "ifstatic", notify => Exec['service apache2 reload'], key => true, } ssl::service { 'video.debconf.org' : ensure => "present", notify => Exec['service apache2 reload'], key => true, } + ssl::service { 'wiki.debconf.org' : ensure => "ifstatic", notify => Exec['service apache2 reload'], key => true, } if has_role('static_mirror_onion') { if ! $onion_v4_addr { diff --git a/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb index 40a4496a2..f9dd94137 100644 --- a/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb +++ b/modules/roles/templates/static-mirroring/vhost/static-vhosts-simple.erb @@ -155,6 +155,45 @@ + + + ForceType text/html + + + ForceType text/html + + + RewriteEngine on + RewriteRule ^/$ /wiki/Main_Page [L,R=permanent] + RewriteRule ^/wiki/$ /wiki/Main_Page [L,R=permanent] + + RewriteCond %{QUERY_STRING} (^|&)modules=mediawiki.legacy.commonPrint,shared|skins.monobook(&|$) + RewriteCond %{QUERY_STRING} (^|&)only=styles(&|$) + RewriteRule ^/load.php$ /load-monobook-styles.css [L,QSD] + + RewriteCond %{QUERY_STRING} (^|&)modules=site(&|$) + RewriteCond %{QUERY_STRING} (^|&)only=styles(&|$) + RewriteRule ^/load.php$ /load-site-styles.css [L,QSD] + + RewriteCond %{QUERY_STRING} (^|&)modules=startup(&|$) + RewriteCond %{QUERY_STRING} (^|&)only=scripts(&|$) + RewriteRule ^/load.php$ /load-startup-scripts.js [L,QSD] + + RewriteCond %{QUERY_STRING} (^|&)modules=site(&|$) + RewriteCond %{QUERY_STRING} (^|&)only=scripts(&|$) + RewriteRule ^/load.php$ /load-site-scripts.js [L,QSD] + + RewriteCond %{QUERY_STRING} (^|&)modules=jquery%2Cmediawiki(&|$) + RewriteCond %{QUERY_STRING} (^|&)only=scripts(&|$) + RewriteRule ^/load.php$ /load-jquery-scripts.js [L,QSD] + + RewriteCond %{QUERY_STRING} (^|&)modules=jquery.client%2Ccookie%2CmessageBox%2CmwExtension|mediawiki.legacy.ajax%2Cwikibits|mediawiki.page.startup|mediawiki.util(&|$) + RewriteRule ^/load.php$ /load-jquery.client.js [L,QSD] + + RewriteCond %{QUERY_STRING} (^|&)modules=jquery.checkboxShiftClick%2CmakeCollapsible%2Cmw-jump%2Cplaceholder%7Cmediawiki.page.ready%7Cmediawiki.user(&|$) + RewriteRule ^/load.php$ /load-jquery.checkbox.js [L,QSD] + + <%= def vhost(lines, sn, kwargs={}) @@ -231,6 +270,7 @@ vhost(lines, "debconf19.debconf.org" , :ssl => true) vhost(lines, "es.debconf.org" , :ssl => true) vhost(lines, "fr.debconf.org" , :ssl => true) vhost(lines, "miniconf10.debconf.org" , :ssl => true) +vhost(lines, "wiki.debconf.org" , :ssl => true, :extra => true) vhost(lines, "deb.debian.org" , :extra => true) vhost(lines, "release.debian.org" , :ssl => true, :extra => true) -- 2.20.1