]> git.openstreetmap.org Git - chef.git/blob - cookbooks/subversion/templates/default/apache.erb
Cleaner redirect using 404 handler for demised sites
[chef.git] / cookbooks / subversion / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:443>
4   ServerName <%= @name %>
5   ServerAdmin webmaster@openstreetmap.org
6
7   SSLEngine on
8   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
9   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
10
11   CustomLog /var/log/apache2/<%= @name %>-access.log combined
12   ErrorLog /var/log/apache2/<%= @name %>-error.log
13
14   RedirectPermanent /applications/editors/josm/plugins/cadastre-fr/images/cadastre_small.png https://raw.githubusercontent.com/openstreetmap/svn-archive/main/applications/editors/josm/plugins/cadastre-fr/images/cadastre_small.png
15   ErrorDocument 404 https://github.com/openstreetmap/svn-archive
16
17 </VirtualHost>
18 <% unless @aliases.empty? -%>
19
20 <VirtualHost *:443>
21   ServerName <%= @aliases.first %>
22 <% @aliases.drop(1).each do |alias_name| -%>
23   ServerAlias <%= alias_name %>
24 <% end -%>
25   ServerAdmin webmaster@openstreetmap.org
26
27   SSLEngine on
28   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
29   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
30
31   CustomLog /var/log/apache2/<%= @name %>-access.log combined
32   ErrorLog /var/log/apache2/<%= @name %>-error.log
33
34   RedirectPermanent / https://<%= @name %>/
35 </VirtualHost>
36 <% end -%>
37
38 <VirtualHost *:80>
39   ServerName <%= @name %>
40 <% @aliases.each do |alias_name| -%>
41   ServerAlias <%= alias_name %>
42 <% end -%>
43
44   ServerAdmin webmaster@openstreetmap.org
45
46   CustomLog /var/log/apache2/<%= @name %>-access.log combined
47   ErrorLog /var/log/apache2/<%= @name %>-error.log
48
49   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
50   RedirectPermanent / https://<%= @name %>/
51 </VirtualHost>