X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Froles%2Ftemplates%2Fsyncproxy%2Fsyncproxy.debian.org-apache.erb;h=ab4ca59871fd2a830a39dba5079890cfa32c6ce0;hb=8a6f86ad8e7da1d84ef781cc4415ede0247fe7ec;hp=bebc6be319bdfe4f05aacd3c26041d44af12c603;hpb=39cd73a3d3b8ad1226dc72f42cefd45d5a3f1287;p=mirror%2Fdsa-puppet.git diff --git a/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb b/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb index bebc6be31..ab4ca5987 100644 --- a/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb +++ b/modules/roles/templates/syncproxy/syncproxy.debian.org-apache.erb @@ -3,19 +3,17 @@ ## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git ## -<% - vhost_listen = [ (bind != '') ? "#{bind}:80" : "*:80", (bind6 != '') ? "#{bind6}:80" : "*:80"].uniq.join(' ') - vhost_listen_443 = [ (bind != '') ? "#{bind}:443" : "*:443", (bind6 != '') ? "#{bind6}:443" : "*:443"].uniq.join(' ') -%> +<% @binds.each do |bind| -%> + Use common-debian-service-https-redirect "<%= bind %>" "<%= @syncproxy_name %>" +<% end -%> -Use common-debian-service-https-redirect "<%= vhost_listen %>" <%= syncproxy_name %> - > - ServerName <%= syncproxy_name %> + > + ServerName <%= @syncproxy_name %> DocumentRoot /srv/www/syncproxy.debian.org/htdocs - Use common-debian-service-ssl <%= syncproxy_name %> + Use common-debian-service-ssl <%= @syncproxy_name %> Use common-ssl-HSTS - Use http-pkp-<%= syncproxy_name %> + Use http-pkp-<%= @syncproxy_name %> Require all granted @@ -27,12 +25,11 @@ Use common-debian-service-https-redirect "<%= vhost_listen %>" <%= syncproxy_nam <%= lines = [] %w{debian debian-debug debian-ports debian-security}.each do |archive| - varname = 'has_srv_mirrors_' + archive.gsub(/[\/-]/,'_') - if has_variable?(varname) and (eval(varname)) == 'true' - lines << " Alias /#{archive}/project/trace/ /srv/mirrors/#{archive}/project/trace/" - lines << " " + varname = ('has' + @mirror_basedir_prefix + archive).gsub(/[\/-]/,'_') + if has_variable?(varname) and (eval("@"+varname)) + lines << " Alias /#{archive}/project/trace/ #{@mirror_basedir_prefix}#{archive}/project/trace/" + lines << " " lines << " Require all granted" - lines << " IndexOptions NameWidth=* +SuppressDescription" lines << " Options +Indexes" lines << " " end