]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: enable ssl
authorGrant Slater <git@firefishy.com>
Fri, 28 Feb 2014 11:26:24 +0000 (11:26 +0000)
committerGrant Slater <git@firefishy.com>
Fri, 28 Feb 2014 11:26:24 +0000 (11:26 +0000)
cookbooks/nominatim/recipes/default.rb
cookbooks/nominatim/templates/default/apache.erb

index 6f3394403a5271971066a0040938eddec689a49c..44806430032eec74ad8ce650d3565ea7780ac092 100644 (file)
@@ -17,7 +17,7 @@
 # limitations under the License.
 #
 
-include_recipe "apache"
+include_recipe "apache::ssl"
 include_recipe "postgresql"
 include_recipe "git"
 
index 010b27ad8a4d9d3d04b8965ce93775f669a6654a..120bccececfa9b8c03c827e8a06d2b2360d0723a 100644 (file)
@@ -1,6 +1,7 @@
 # DO NOT EDIT - This file is being maintained by Chef
 
-<VirtualHost *:80>
+<% [80, 443].each do |port| -%>
+<VirtualHost *:<%= port %>>
     ServerName nominatim.openstreetmap.org
     ServerAdmin webmaster@openstreetmap.org
     ServerAlias nominatim.osm.org
@@ -9,6 +10,13 @@
     ServerAlias nominatim.openstreetmaps.org
     ServerAlias nominatim.openmaps.org
 
+<% if port == 443 -%>
+    #
+    # Enable SSL
+    #
+    SSLEngine on
+<% end -%>
+
     CustomLog /var/log/apache2/nominatim.openstreetmap.org-access.log combined
     ErrorLog /var/log/apache2/nominatim.openstreetmap.org-error.log
 
@@ -54,3 +62,5 @@
     RewriteRule ^/([sdr].*) /pool-${bulklist:%{REMOTE_ADDR}|www}/$1 [PT]
 
 </VirtualHost>
+
+<% end -%>