]> git.openstreetmap.org Git - chef.git/blob - cookbooks/subversion/templates/default/apache.erb
251dbc8e445de6faa19c27094049f3e0d2be8567
[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 <% unless @aliases.empty? -%>
36
37 <VirtualHost *:443>
38   ServerName <%= @aliases.first %>
39 <% @aliases.drop(1).each do |alias_name| -%>
40   ServerAlias <%= alias_name %>
41 <% end -%>
42   ServerAdmin webmaster@openstreetmap.org
43
44   SSLEngine on
45   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
46   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
47
48   CustomLog /var/log/apache2/<%= @name %>-access.log combined
49   ErrorLog /var/log/apache2/<%= @name %>-error.log
50
51   RedirectPermanent / https://<%= @name %>/
52 </VirtualHost>
53 <% end -%>
54
55 <VirtualHost *:80>
56   ServerName <%= @name %>
57 <% @aliases.each do |alias_name| -%>
58   ServerAlias <%= alias_name %>
59 <% end -%>
60
61   ServerAdmin webmaster@openstreetmap.org
62
63   CustomLog /var/log/apache2/<%= @name %>-access.log combined
64   ErrorLog /var/log/apache2/<%= @name %>-error.log
65
66   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
67   RedirectPermanent / https://<%= @name %>/
68 </VirtualHost>