]> git.openstreetmap.org Git - chef.git/blob - cookbooks/subversion/templates/default/apache.erb
subversion: Disable svn.osm.org and add redirect
[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   RedirectPermanent / https://github.com/openstreetmap/svn-archive
16
17   ErrorDocument 404 https://github.com/openstreetmap/svn-archive
18
19 </VirtualHost>
20 <% unless @aliases.empty? -%>
21
22 <VirtualHost *:443>
23   ServerName <%= @aliases.first %>
24 <% @aliases.drop(1).each do |alias_name| -%>
25   ServerAlias <%= alias_name %>
26 <% end -%>
27   ServerAdmin webmaster@openstreetmap.org
28
29   SSLEngine on
30   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
31   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
32
33   CustomLog /var/log/apache2/<%= @name %>-access.log combined
34   ErrorLog /var/log/apache2/<%= @name %>-error.log
35
36   RedirectPermanent / https://<%= @name %>/
37 </VirtualHost>
38 <% end -%>
39
40 <VirtualHost *:80>
41   ServerName <%= @name %>
42 <% @aliases.each do |alias_name| -%>
43   ServerAlias <%= alias_name %>
44 <% end -%>
45
46   ServerAdmin webmaster@openstreetmap.org
47
48   CustomLog /var/log/apache2/<%= @name %>-access.log combined
49   ErrorLog /var/log/apache2/<%= @name %>-error.log
50
51   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
52   RedirectPermanent / https://<%= @name %>/
53 </VirtualHost>