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