conf "tile.conf.erb"
end
+ssl_certificate node[:fqdn] do
+ domains [node[:fqdn], "render.openstreetmap.org"]
+ notifies :reload, "service[apache2]"
+end
+
tilecaches = search(:node, "roles:tilecache").sort_by { |n| n[:hostname] }
apache_site "default" do
# DO NOT EDIT - This file is being maintained by Chef
-<VirtualHost *:80>
+<% [80, 443].each do |port| -%>
+<VirtualHost *:<%= port %>>
# Basic server configuration
ServerName <%= node[:fqdn] %>
- ServerAlias tile.openstreetmap.org
ServerAlias render.openstreetmap.org
ServerAlias *.render.openstreetmap.org
- ServerAlias parent.tile.openstreetmap.org
ServerAdmin webmaster@openstreetmap.org
+<% if port == 443 -%>
+
+ #
+ # Enable SSL
+ #
+ SSLEngine on
+ SSLProxyEngine on
+ SSLCertificateFile /etc/ssl/certs/<%= node[:fqdn] %>.pem
+ SSLCertificateKeyFile /etc/ssl/private/<%= node[:fqdn] %>.key
+<% end -%>
# Configure location of static files and CGI scripts
DocumentRoot /srv/tile.openstreetmap.org/html
RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
</VirtualHost>
+<% end -%>
<Directory /srv/tile.openstreetmap.org/html>
Options None
AllowOverride None
-default[:tilecache][:tile_parent] = "parent.tile.openstreetmap.org"
+default[:tilecache][:tile_parent] = "render.openstreetmap.org"
default[:tilecache][:tile_siblings] = []
# Per IP bucket refill rate