]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/gps-tile/templates/default/apache.erb
Use apache 2.4 style access controls
[chef.git] / cookbooks / gps-tile / templates / default / apache.erb
index 7572327c3a48b57d6a5fa602266876916f35ab95..73564f5438635febd275971aae3d944ef2394d37 100644 (file)
@@ -1,11 +1,19 @@
 # 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 gps.tile.openstreetmap.org
+  ServerAlias gps-*.tile.openstreetmap.org
   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
   Header set Access-Control-Allow-Origin "*"
 </VirtualHost>
 
+<% end -%>
 <Directory /srv/gps-tile.openstreetmap.org/html>
   Options None
   AllowOverride None
-  Order allow,deny
-  Allow from all
+  Require all granted
+</Directory>
+
+<Directory /srv/gps-tile.openstreetmap.org/updater>
+  <Files tile>
+    Require all granted
+  </Files>
 </Directory>