]> git.openstreetmap.org Git - chef.git/blob - cookbooks/irc/templates/default/apache.erb
Replace cgiirc with a form frontend for webchat.oftc.net
[chef.git] / cookbooks / irc / 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   ErrorLog /var/log/apache2/<%= @name %>-error.log
13
14   DocumentRoot <%= @directory %>
15 </VirtualHost>
16 <% unless @aliases.empty? -%>
17
18 <VirtualHost *:443>
19   ServerName <%= @aliases.first %>
20 <% @aliases.drop(1).each do |alias_name| -%>
21   ServerAlias <%= alias_name %>
22 <% end -%>
23   ServerAdmin webmaster@openstreetmap.org
24
25   SSLEngine on
26   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
27   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
28
29   CustomLog /var/log/apache2/<%= @name %>-access.log combined
30   ErrorLog /var/log/apache2/<%= @name %>-error.log
31
32   RedirectPermanent / https://<%= @name %>/
33 </VirtualHost>
34 <% end -%>
35
36 <VirtualHost *:80>
37   ServerName <%= @name %>
38 <% @aliases.each do |alias_name| -%>
39   ServerAlias <%= alias_name %>
40 <% end -%>
41   ServerAdmin webmaster@openstreetmap.org
42
43   CustomLog /var/log/apache2/<%= @name %>-access.log combined
44   ErrorLog /var/log/apache2/<%= @name %>-error.log
45
46   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
47   RedirectPermanent / https://<%= @name %>/
48 </VirtualHost>
49
50 <Directory <%= @directory %>>
51   Require all granted
52 </Directory>