]> git.openstreetmap.org Git - chef.git/blob - cookbooks/podman/templates/default/apache.erb
Use volume for nested podman container storage
[chef.git] / cookbooks / podman / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <VirtualHost *:80>
4   ServerName <%= @name %>
5 <% @aliases.each do |alias_name| -%>
6   ServerAlias <%= alias_name %>
7 <% end -%>
8   ServerAdmin webmaster@openstreetmap.org
9
10   CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
11   ErrorLog /var/log/apache2/<%= @name %>-error.log
12
13   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
14   RedirectPermanent / https://<%= @name %>/
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   CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
26   ErrorLog /var/log/apache2/<%= @name %>-error.log
27
28   SSLEngine on
29   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
30   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
31
32   RedirectPermanent / https://<%= @name %>/
33 </VirtualHost>
34 <% end -%>
35
36 <VirtualHost *:443>
37   ServerName <%= @name %>
38   ServerAdmin webmaster@openstreetmap.org
39
40   CustomLog /var/log/apache2/<%= @name %>-access.log combined_extended
41   ErrorLog /var/log/apache2/<%= @name %>-error.log
42
43   SSLEngine on
44   SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem
45   SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key
46
47   # Discard any client-supplied X-Forwarded-For
48   RequestHeader unset X-Forwarded-For
49
50   RequestHeader set X-Forwarded-Proto "https"
51   RequestHeader set X-Forwarded-Port "443"
52
53   ProxyPass / http://localhost:<%= @port %>/
54   ProxyPreserveHost on
55 </VirtualHost>