Revert "Add ssl to metadata.ftp-master.d.o"
[mirror/dsa-puppet.git] / modules / roles / templates / syncproxy / syncproxy.debian.org-apache.erb
index e81cbe3..ab4ca59 100644 (file)
@@ -3,20 +3,11 @@
 ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
 ##
 
-<%
-  vhost_listen = [ (@bind != '') ? "#{@bind}" : "*",  (@bind6 != '') ? "#{@bind6}" : "*"].uniq
-  vhost_listen_443 = [ (@bind != '') ? "#{@bind}:443" : "*:443",  (@bind6 != '') ? "[#{@bind6}]:443" : "*:443"].uniq
-%>
+<% @binds.each do |bind| -%>
+  Use common-debian-service-https-redirect "<%= bind %>" "<%= @syncproxy_name %>"
+<% end -%>
 
-<%=
-lines = []
-vhost_listen.each do |bind|
-   lines << "Use common-debian-service-https-redirect \"#{bind}\" \"#{@syncproxy_name}\""
-end
-lines.join("\n")
-
-%>
-<Virtualhost <%= vhost_listen_443.join(' ') %> >
+<Virtualhost <%= @binds.map { |bind| "#{bind}:443" }.join(' ') %> >
    ServerName <%= @syncproxy_name %>
    DocumentRoot /srv/www/syncproxy.debian.org/htdocs
 
@@ -34,10 +25,10 @@ lines.join("\n")
 <%=
 lines = []
 %w{debian debian-debug debian-ports debian-security}.each do |archive|
-  varname = 'has_srv_mirrors_' + archive.gsub(/[\/-]/,'_')
+  varname = ('has' + @mirror_basedir_prefix + archive).gsub(/[\/-]/,'_')
   if has_variable?(varname) and (eval("@"+varname))
-    lines << "  Alias /#{archive}/project/trace/ /srv/mirrors/#{archive}/project/trace/"
-    lines << "  <Directory /srv/mirrors/#{archive}/project/trace/>"
+    lines << "  Alias /#{archive}/project/trace/ #{@mirror_basedir_prefix}#{archive}/project/trace/"
+    lines << "  <Directory #{@mirror_basedir_prefix}#{archive}/project/trace/>"
     lines << "    Require all granted"
     lines << "    Options +Indexes"
     lines << "  </Directory>"