From e4f3321f72750452a7c0960fca7c527108274ddb Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 22 Oct 2013 08:54:57 +0100 Subject: [PATCH 1/1] Enable SSL for the GPS tile server --- cookbooks/gps-tile/recipes/default.rb | 2 +- cookbooks/gps-tile/templates/default/apache.erb | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/cookbooks/gps-tile/recipes/default.rb b/cookbooks/gps-tile/recipes/default.rb index 2a4db9582..eb019f8f0 100644 --- a/cookbooks/gps-tile/recipes/default.rb +++ b/cookbooks/gps-tile/recipes/default.rb @@ -17,7 +17,7 @@ # limitations under the License. # -include_recipe "apache" +include_recipe "apache::ssl" package "make" package "build-essential" diff --git a/cookbooks/gps-tile/templates/default/apache.erb b/cookbooks/gps-tile/templates/default/apache.erb index 7572327c3..12d24d131 100644 --- a/cookbooks/gps-tile/templates/default/apache.erb +++ b/cookbooks/gps-tile/templates/default/apache.erb @@ -1,11 +1,17 @@ # DO NOT EDIT - This file is being maintained by Chef - +<% [80, 443].each do |port| -%> +> # Basic server configuration ServerName <%= node[:fqdn] %> ServerAlias gps-tile.openstreetmap.org ServerAlias *.gps-tile.openstreetmap.org ServerAdmin webmaster@openstreetmap.org +<% if port == 443 -%> + + # Enable SSL + SSLEngine on +<% end -%> # Configure location of static files DocumentRoot /srv/gps-tile.openstreetmap.org/html @@ -26,6 +32,7 @@ Header set Access-Control-Allow-Origin "*" +<% end -%> Options None AllowOverride None -- 2.43.2