1 # DO NOT EDIT - This file is being maintained by Chef
4 ServerName <%= @name %>
5 <% @aliases.each do |alias_name| -%>
6 ServerAlias <%= alias_name %>
8 ServerAdmin webmaster@openstreetmap.org
10 CustomLog /var/log/apache2/<%= @name %>-access.log combined
11 ErrorLog /var/log/apache2/<%= @name %>-error.log
13 RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
14 RedirectPermanent / https://<%= @name %>/
17 <% unless @aliases.empty? -%>
19 ServerName <%= @aliases.first %>
20 <% @aliases.slice(1..-1).each do |alias_name| -%>
21 ServerAlias <%= alias_name %>
23 ServerAdmin webmaster@openstreetmap.org
26 SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
27 SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
29 CustomLog /var/log/apache2/<%= @name %>-access.log combined
30 ErrorLog /var/log/apache2/<%= @name %>-error.log
32 RedirectPermanent / https://<%= @name %>/
37 ServerName <%= @name %>
38 ServerAdmin webmaster@openstreetmap.org
41 SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
42 SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
44 CustomLog /var/log/apache2/<%= @name %>-access.log combined
45 ErrorLog /var/log/apache2/<%= @name %>-error.log
47 DocumentRoot <%= @directory %>
49 Alias /gitweb /usr/share/gitweb
50 Alias /git /var/cache/git
51 ScriptAlias /gitweb.cgi /usr/lib/cgi-bin/gitweb.cgi
54 RewriteRule ^/$ /gitweb.cgi%{REQUEST_URI} [L,PT]
55 RewriteRule ^/(.*\.git/(?!/?(HEAD|info|objects|refs)).*)?$ /gitweb.cgi%{REQUEST_URI} [L,PT]
58 <Directory <%= @directory %>>