The debian-backports repository is obsolete. Remove from autofs and rsync/syncproxy...
[mirror/dsa-puppet.git] / modules / roles / templates / syncproxy / syncproxy.debian.org-apache.erb
1 ##
2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
4 ##
5
6 <%
7   vhost_listen = [ (bind != '') ? "#{bind}:80" : "*:80",  (bind6 != '') ? "#{bind6}:80" : "*:80"].uniq.join(' ')
8   vhost_listen_443 = [ (bind != '') ? "#{bind}:443" : "*:443",  (bind6 != '') ? "#{bind6}:443" : "*:443"].uniq.join(' ')
9 %>
10
11 Use common-debian-service-https-redirect "<%= vhost_listen %>" <%= syncproxy_name %>
12 <Virtualhost <%= vhost_listen_443 %> >
13    ServerName <%= syncproxy_name %>
14    DocumentRoot /srv/www/syncproxy.debian.org/htdocs
15
16    Use common-debian-service-ssl <%= syncproxy_name %>
17    Use common-ssl-HSTS
18
19    <Directory /srv/www/syncproxy.debian.org/htdocs>
20       Require all granted
21    </Directory>
22
23    CustomLog /var/log/apache2/syncproxy.debian.org-access.log privacy
24    ErrorLog /var/log/apache2/syncproxy.debian.org-error.log
25
26 <%=
27 lines = []
28 %w{debian debian-debug debian-security}.each do |archive|
29   varname = 'has_srv_mirrors_' + archive.gsub(/[\/-]/,'_')
30   if has_variable?(varname) and (eval(varname)) == 'true'
31     lines << "  Alias /#{archive}/project/trace/ /srv/mirrors/#{archive}/project/trace/"
32     lines << "  <Directory /srv/mirrors/#{archive}/project/trace/>"
33     lines << "    Require all granted"
34     lines << "    IndexOptions NameWidth=* +SuppressDescription"
35     lines << "    Options +Indexes"
36     lines << "  </Directory>"
37   end
38 end
39
40 lines.join("\n")
41 %>
42
43 </VirtualHost>
44
45 # vim: set ts=3 sw=3 et: