]> git.openstreetmap.org Git - chef.git/blob - cookbooks/gps-tile/templates/default/apache.erb
Use the tile.openstreetmap.org certificate for the GPS tile server
[chef.git] / cookbooks / gps-tile / templates / default / apache.erb
1 # DO NOT EDIT - This file is being maintained by Chef
2
3 <% [80, 443].each do |port| -%>
4 <VirtualHost *:<%= port %>>
5   # Basic server configuration
6   ServerName <%= node[:fqdn] %>
7   ServerAlias gps-tile.openstreetmap.org
8   ServerAlias *.gps-tile.openstreetmap.org
9   ServerAdmin webmaster@openstreetmap.org
10 <% if port == 443 -%>
11
12   # Enable SSL
13   SSLEngine on
14 <% end -%>
15
16   # Configure location of static files
17   DocumentRoot /srv/gps-tile.openstreetmap.org/html
18
19   # Configure the CGI script that serves the tiles
20   ScriptAlias /lines /srv/gps-tile.openstreetmap.org/updater/tile
21
22   # Temporary redirect for old CGI location
23   RedirectPermanent /gps-lines/tile /lines
24
25   # Setup logging
26   CustomLog /var/log/apache2/access.log combined
27   ErrorLog /var/log/apache2/error.log
28   BufferedLogs on
29
30   # Always set Access-Control-Allow-Origin so that simple CORS requests
31   # will always work and can be cached
32   Header set Access-Control-Allow-Origin "*"
33 </VirtualHost>
34
35 <% end -%>
36 <Directory /srv/gps-tile.openstreetmap.org/html>
37   Options None
38   AllowOverride None
39   Order allow,deny
40   Allow from all
41 </Directory>