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 1519935..31c78f7 100644 (file)
@@ -99,6 +99,7 @@
                        ForceType text/html
                        AddDefaultCharset utf-8
                </Files>
+               AddType text/plain .wml
        </Directory>
 </Macro>
 
        ServerAlias www-test.debconf.org
 
        <Directory /srv/static.debian.org/mirrors/www.debconf.org/cur>
-               Options +Includes
+               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>
 
 <%=
@@ -390,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