]> git.openstreetmap.org Git - chef.git/blob - cookbooks/subversion/templates/default/apache.erb
Switch svn to letsencrypt
[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
19                 AuthType Basic
20                 AuthName "<%= @realm %>"
21                 AuthUserFile <%= @password_file %>
22
23                 LimitXMLRequestBody 0
24                 LimitRequestBody 0
25
26                 <Limit GET PROPFIND OPTIONS REPORT>
27                         Require all granted
28                 </Limit>
29
30                 <LimitExcept GET PROPFIND OPTIONS REPORT>
31                         Require valid-user
32                 </LimitExcept>
33         </Location>
34 </VirtualHost>
35
36 <VirtualHost *:80>
37         ServerName <%= @name %>
38         ServerAdmin webmaster@openstreetmap.org
39
40         CustomLog /var/log/apache2/<%= @name %>-access.log combined
41         ErrorLog /var/log/apache2/<%= @name %>-error.log
42
43         RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
44         RedirectPermanent / https://<%= @name %>/
45 </VirtualHost>