content => template('roles/static-mirroring/vhost/static-vhosts-simple.erb'),
}
+ $wwwdo_server_name = 'www.debian.org'
$wwwdo_document_root = '/srv/static.debian.org/mirrors/www.debian.org/cur'
apache2::site { '005-www.debian.org':
site => 'www.debian.org',
notify => Exec['service apache2 reload'],
key => true,
}
+
+ $wwwdo_server_name = 'www-staging.debian.org'
+ $wwwdo_document_root = '/srv/www.debian.org/www'
+ apache2::site { '005-www-staging.debian.org':
+ site => 'www-staging.debian.org',
+ content => template('roles/apache-www.debian.org.erb'),
+ }
+
+ ssl::service { 'www-staging.debian.org' :
+ notify => Exec['service apache2 reload'],
+ key => true,
+ }
}
</Macro>
<Macro common-www.d.o>
- ServerName www.debian.org
- ServerAlias www-*.debian.org
+ ServerName <%= @wwwdo_server_name %>
Use common-www.d.o-inner
</Macro>
ErrorLog /var/log/apache2/www.debian.org-error.log
CustomLog /var/log/apache2/www.debian.org-access.log privacy
- ServerName www.debian.org
- Redirect / https://www.debian.org/
+ ServerName <%= @wwwdo_server_name %>
+ Redirect / https://<%= @wwwdo_server_name %>/
</VirtualHost>
<VirtualHost <%= @vhost_listen_443 %> >
ErrorLog /var/log/apache2/www.debian.org-error.log
Use common-www.d.o
- Use common-debian-service-ssl www.debian.org
+ Use common-debian-service-ssl <%= @wwwdo_server_name %>
Use common-ssl-HSTS
</VirtualHost>
-
-<% if scope.function_onion_global_service_hostname(['www.debian.org']) -%>
+<% if scope.function_onion_global_service_hostname([@wwwdo_server_name]) -%>
<VirtualHost <%= @vhost_listen %> >
ErrorLog /var/log/apache2/www.debian.org-error.log
CustomLog /var/log/apache2/www.debian.org-access.log privacy
- ServerName <%= scope.function_onion_global_service_hostname(['www.debian.org']) %>
+ ServerName <%= scope.function_onion_global_service_hostname([@wwwdo_server_name]) %>
Use common-www.d.o-inner
</VirtualHost>