Try new www vhost config
[mirror/dsa-puppet.git] / modules / roles / templates / apache-www.debian.org.erb
index a4a4e8d..aee7380 100644 (file)
    RewriteRule ^/(.*)$ http://www.debian.org/$1 [R=301,L]
 </VirtualHost>
 
-<VirtualHost <%= vhost_listen %> >
+
+
+<Macro common-www.d.o>
    ServerName www.debian.org
    ServerAdmin webmaster@debian.org
    ServerAlias www-*.debian.org
 # Canonical place for manuals under /doc/manuals/
    RewriteCond %{DOCUMENT_ROOT}/doc/manuals/$1 -d
    RewriteRule ^/doc/([^/]+)/?(.*)? /doc/manuals/$1/$2 [L,R=301]
+</Macro>
+
+
+<VirtualHost <%= vhost_listen %> >
+   Use common-www.d.o
+</VirtualHost>
+<VirtualHost <%= vhost_listen_443 %> >
+   Use common-www.d.o
+
+   Use common-debian-service-ssl www.debian.org
+   Use common-ssl-HSTS
+</VirtualHost>
+
+
+<VirtualHost <%= vhost_listen_443 %> >
+   ServerName debian.org
+   ServerAdmin webmaster@debian.org
+
+   CustomLog /var/log/apache2/www-other-access.log privacy
+   ErrorLog /var/log/apache2/www-other-error.log
+
+   Redirect permanent / https://www.debian.org/
 
+   Use common-debian-service-ssl www.debian.org
+   Use common-ssl-HSTS
 </VirtualHost>