]> git.openstreetmap.org Git - chef.git/blob - cookbooks/subversion/templates/default/apache.erb
tilecache: switch nginx upstream to squid port 8080
[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     AuthType Basic
23     AuthName "<%= @realm %>"
24     AuthUserFile <%= @password_file %>
25
26     LimitXMLRequestBody 0
27     LimitRequestBody 0
28
29     <Limit GET PROPFIND OPTIONS REPORT>
30       Require all granted
31     </Limit>
32
33     <LimitExcept GET PROPFIND OPTIONS REPORT>
34       Require valid-user
35     </LimitExcept>
36   </Location>
37 </VirtualHost>
38 <% unless @aliases.empty? -%>
39
40 <VirtualHost *:443>
41   ServerName <%= @aliases.first %>
42 <% @aliases.drop(1).each do |alias_name| -%>
43   ServerAlias <%= alias_name %>
44 <% end -%>
45   ServerAdmin webmaster@openstreetmap.org
46
47   SSLEngine on
48   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
49   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
50
51   CustomLog /var/log/apache2/<%= @name %>-access.log combined
52   ErrorLog /var/log/apache2/<%= @name %>-error.log
53
54   RedirectPermanent / https://<%= @name %>/
55 </VirtualHost>
56 <% end -%>
57
58 <VirtualHost *:80>
59   ServerName <%= @name %>
60 <% @aliases.each do |alias_name| -%>
61   ServerAlias <%= alias_name %>
62 <% end -%>
63
64   ServerAdmin webmaster@openstreetmap.org
65
66   CustomLog /var/log/apache2/<%= @name %>-access.log combined
67   ErrorLog /var/log/apache2/<%= @name %>-error.log
68
69   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
70   RedirectPermanent / https://<%= @name %>/
71 </VirtualHost>