]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/roles/templates/static-mirroring/static-vhost.conf.erb
update macros
[dsa-puppet.git] / modules / roles / templates / static-mirroring / static-vhost.conf.erb
1 # puppet maintained
2
3 <Macro common-static-base $name>
4         <IfModule mod_userdir.c>
5                 UserDir disabled
6         </IfModule>
7         ServerSignature On
8
9         DocumentRoot /srv/static.debian.org/mirrors/$name/cur
10         <Directory /srv/static.debian.org/mirrors/$name/cur>
11                 AllowOverride FileInfo
12                 Options Multiviews Indexes FollowSymLinks
13                 IndexOptions FancyIndexing NameWidth=*
14                 Order allow,deny
15                 Allow from all
16         </Directory>
17
18         DefaultType text/plain
19         AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
20 </Macro>
21
22
23 <Macro common-static-vhost-with-extra $name $extra>
24         <Virtualhost <%= vhost_listen %> >
25                 ServerName $name
26                 ServerAdmin debian-admin@lists.debian.org
27
28                 ErrorLog /var/log/apache2/$name-error.log
29                 CustomLog /var/log/apache2/$name-access.log privacy
30
31                 Use common-static-base $name
32                 $extra
33                 DefaultType text/plain
34         </VirtualHost>
35 </Macro>
36
37 <Macro common-static-vhost-publiclog $name>
38         <Virtualhost <%= vhost_listen %> >
39                 ServerName $name
40                 ServerAdmin debian-admin@lists.debian.org
41
42                 ErrorLog /var/log/apache2/$name-error.log
43                 CustomLog /var/log/apache2/$name-access.log privacy
44                 <IfModule mod_geoip.c>
45                         CustomLog /var/log/apache2/$name-public-access.log privacy+geo
46                 </IfModule>
47
48                 Use common-static-base $name
49                 DefaultType text/plain
50         </VirtualHost>
51 </Macro>
52
53 <Macro common-static-vhost $name>
54         Use common-static-vhost-with-extra $name "# nada"
55 </Macro>
56
57
58 # vim:ft=apache: