]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - modules/roles/templates/static-mirroring/static-vhost.conf.erb
Serve xhtml from generic cofiguration
[dsa-puppet.git] / modules / roles / templates / static-mirroring / static-vhost.conf.erb
index ea0d2acb1b2a817e745c9e6b9b6c9505201b2d60..2e79bcbdd96deea22fa5d76654bd282d44a79ab2 100644 (file)
@@ -1,35 +1,57 @@
 # puppet maintained
 
-<Macro common-static-vhost $name>
-<Macro common-$name>
+<Macro common-static-base $name>
        <IfModule mod_userdir.c>
                UserDir disabled
        </IfModule>
        ServerSignature On
 
-       DocumentRoot /srv/static.debian.org/cur/$name/
-       <Directory /srv/static.debian.org/cur/$name/>
-               AllowOverride FileInfo
-               Options Multiviews Indexes FollowSymLinks
+       DocumentRoot /srv/static.debian.org/mirrors/$name/cur
+       <Directory /srv/static.debian.org/mirrors/$name/cur>
+               AllowOverride FileInfo Indexes Options=Multiviews
+               Options Multiviews Indexes FollowSymLinks Includes
                IndexOptions FancyIndexing NameWidth=*
                Order allow,deny
                Allow from all
        </Directory>
 
+       DefaultType text/plain
        AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
+       AddOutputFilter INCLUDES .xhtml
 </Macro>
 
-<Virtualhost <%= vhost_listen %> >
-       ServerName $name
-       ServerAdmin debian-admin@lists.debian.org
 
+<Macro common-static-vhost-with-extra $name $extra>
+       <Virtualhost <%= vhost_listen %> >
+               ServerName $name
+               ServerAdmin debian-admin@lists.debian.org
+
+               ErrorLog /var/log/apache2/$name-error.log
+               CustomLog /var/log/apache2/$name-access.log privacy
+
+               Use common-static-base $name
+               $extra
+       </VirtualHost>
+</Macro>
+
+<Macro common-static-vhost-publiclog $name>
+       <Virtualhost <%= vhost_listen %> >
+               ServerName $name
+               ServerAdmin debian-admin@lists.debian.org
 
-       ErrorLog /var/log/apache2/$name-error.log
-       CustomLog /var/log/apache2/$name-access.log combined
+               ErrorLog /var/log/apache2/$name-error.log
+               CustomLog /var/log/apache2/$name-access.log privacy
+               <IfModule mod_geoip.c>
+                       CustomLog /var/log/apache2/$name-public-access.log privacy+geo
+               </IfModule>
 
-       Use common-$name
-</VirtualHost>
+               Use common-static-base $name
+       </VirtualHost>
+</Macro>
 
+<Macro common-static-vhost $name>
+       Use common-static-vhost-with-extra $name "# nada"
 </Macro>
 
+
 # vim:ft=apache: