]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/roles/templates/static-mirroring/static-vhost.conf.erb
More complex bits.debian.org config
[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 Indexes Options=Multiviews
12                 IndexOptions FancyIndexing NameWidth=*
13                 Order allow,deny
14                 Allow from all
15         </Directory>
16
17         DefaultType text/plain
18         AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
19 </Macro>
20
21
22 <Macro common-static-vhost-with-extra $name $extra>
23         <Virtualhost <%= vhost_listen %> >
24                 ServerName $name
25                 ServerAdmin debian-admin@lists.debian.org
26
27                 ErrorLog /var/log/apache2/$name-error.log
28                 CustomLog /var/log/apache2/$name-access.log privacy
29
30                 Use common-static-base $name
31                 $extra
32         </VirtualHost>
33 </Macro>
34
35 <Macro common-static-vhost $name>
36         Use common-static-vhost-with-extra $name "# nada"
37 </Macro>
38
39
40 <Macro common-static-vhost-ssl $name>
41         <VirtualHost <%= vhost_listen %> >
42                 ServerName $name
43                 ServerAdmin debian-admin@lists.debian.org
44
45                 CustomLog /var/log/apache2/$name-access.log privacy
46                 ErrorLog /var/log/apache2/$name-error.log
47
48                 Redirect permanent / https://$name/
49         </VirtualHost>
50
51         <Virtualhost <%= vhost_listen_443 %> >
52                 ServerName $name
53                 ServerAdmin debian-admin@lists.debian.org
54
55                 ErrorLog /var/log/apache2/$name-error.log
56                 CustomLog /var/log/apache2/$name-access.log privacyssl
57
58                 Use common-debian-service-ssl $name
59                 Use common-ssl-HSTS
60
61                 Use common-static-base $name
62         </VirtualHost>
63 </Macro>
64
65 # vim:ft=apache: