release.d.o: don't serve *.wml as text/vnd.wap.wml
[mirror/dsa-puppet.git] / modules / roles / templates / static-mirroring / vhost / static-vhosts-simple.erb
index 67c2c60..31c78f7 100644 (file)
@@ -99,6 +99,7 @@
                        ForceType text/html
                        AddDefaultCharset utf-8
                </Files>
+               AddType text/plain .wml
        </Directory>
 </Macro>
 
        </FilesMatch>
 </Macro>
 
+<Macro vstatic-vhost-extra-wiki.debconf.org>
+       <Location /wiki/>
+               ForceType text/html
+       </Location>
+       <Location /action/>
+               ForceType text/html
+       </Location>
+
+       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]
+</Macro>
+
+<Macro vstatic-vhost-extra-www.debconf.org>
+       ServerAlias www-test.debconf.org
+
+       <Directory /srv/static.debian.org/mirrors/www.debconf.org/cur>
+               Options +IncludesNOEXEC
+               SSILegacyExprParser on
+               DirectoryIndex index.shtml
+       </Directory>
+
+       AddOutputFilter INCLUDES .shtml
+
+       RewriteEngine On
+       # A few redirects for older debconf sites, so old links work
+       RewriteRule ^/gallery/(.*)$ https://gallery.debconf.org/v/$1 [R=permanent,L]
+       RewriteRule ^/.*years$ https://10years.debconf.org/ [R=permanent,L]
+       RewriteRule ^/debconf2$ https://debconf2.debconf.org/ [R=permanent,L]
+       RewriteRule ^/debconf3$ https://debconf3.debconf.org/ [R=permanent,L]
+       RewriteRule ^/debconf4$ https://debconf4.debconf.org/ [R=permanent,L]
+       RewriteRule ^/debconf5$ https://debconf5.debconf.org/ [R=permanent,L]
+       RewriteRule ^/10years/(.*)$ https://10years.debconf.org/$1 [R=permanent,L]
+       RewriteRule ^/debconf2/(.*)$ https://debconf2.debconf.org/$1 [R=permanent,L]
+       RewriteRule ^/debconf3/(.*)$ https://debconf3.debconf.org/$1 [R=permanent,L]
+       RewriteRule ^/debconf4/(.*)$ https://debconf4.debconf.org/$1 [R=permanent,L]
+       RewriteRule ^/debconf5/(.*)$ https://debconf5.debconf.org/$1 [R=permanent,L]
+</Macro>
+
 <%=
 
 def vhost(lines, sn, kwargs={})
@@ -231,6 +297,8 @@ 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, "www.debconf.org"               , :ssl => true, :extra => true)
 
 vhost(lines, "deb.debian.org"                , :extra => true)
 vhost(lines, "release.debian.org"            , :ssl => true, :extra => true)
@@ -339,6 +407,15 @@ Use common-dsa-vhost-https-redirect video.debconf.org
 </VirtualHost>
 <% end -%>
 
+Use common-dsa-vhost-https-redirect debconf.org
+<VirtualHost <%= @vhost_listen_443 %> >
+       ServerName debconf.org
+       ServerAdmin debian-admin@debian.org
+       Use common-debian-service-ssl debconf.org
+       Use common-ssl-HSTS
+       Redirect / https://www.debconf.org/
+</VirtualHost>
+
 # historical sites
 ##################
 # now only redirects remain
@@ -411,6 +488,7 @@ Use common-dsa-vhost-https-redirect archive.debian.net
        ServerName cdimage.debian.org
        ServerAlias cloud.debian.org
        ServerAlias get.debian.org
+       ServerAlias bttracker.debian.org
        ServerAlias meetings-archive.debian.net
        ServerAdmin debian-admin@debian.org
        ErrorLog /var/log/apache2/cdimage.debian.org-error.log
@@ -432,6 +510,7 @@ Use common-dsa-vhost-https-redirect archive.debian.net
        ServerName cdimage.debian.org
        ServerAlias cloud.debian.org
        ServerAlias get.debian.org
+       ServerAlias bttracker.debian.org
        ServerAlias meetings-archive.debian.net
        ServerAdmin debian-admin@debian.org
        ErrorLog /var/log/apache2/cdimage.debian.org-error.log