]> git.openstreetmap.org Git - chef.git/blob - cookbooks/subversion/templates/default/apache.erb
Revert "Disable HTTP2 for svn.openstreetmap.org"
[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   CustomLog /var/log/apache2/<%= @name %>-svn-access.log "%h %t %u %{SVN-ACTION}e" env=SVN-ACTION
13   ErrorLog /var/log/apache2/<%= @name %>-error.log
14
15   <Location />
16     DAV svn
17     SVNPath <%= @directory %>
18     SVNIndexXSLT /svnindex.xsl
19
20     LimitXMLRequestBody 0
21     LimitRequestBody 0
22
23     <Limit GET PROPFIND OPTIONS REPORT>
24       Require all granted
25     </Limit>
26
27     <LimitExcept GET PROPFIND OPTIONS REPORT>
28       Require all denied
29     </LimitExcept>
30   </Location>
31 </VirtualHost>
32 <% unless @aliases.empty? -%>
33
34 <VirtualHost *:443>
35   ServerName <%= @aliases.first %>
36 <% @aliases.drop(1).each do |alias_name| -%>
37   ServerAlias <%= alias_name %>
38 <% end -%>
39   ServerAdmin webmaster@openstreetmap.org
40
41   SSLEngine on
42   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
43   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
44
45   CustomLog /var/log/apache2/<%= @name %>-access.log combined
46   ErrorLog /var/log/apache2/<%= @name %>-error.log
47
48   RedirectPermanent / https://<%= @name %>/
49 </VirtualHost>
50 <% end -%>
51
52 <VirtualHost *:80>
53   ServerName <%= @name %>
54 <% @aliases.each do |alias_name| -%>
55   ServerAlias <%= alias_name %>
56 <% end -%>
57
58   ServerAdmin webmaster@openstreetmap.org
59
60   CustomLog /var/log/apache2/<%= @name %>-access.log combined
61   ErrorLog /var/log/apache2/<%= @name %>-error.log
62
63   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
64   RedirectPermanent / https://<%= @name %>/
65 </VirtualHost>