]> git.openstreetmap.org Git - chef.git/blob - cookbooks/gps-tile/templates/default/apache.erb
Specify name explicitly in cookbook metadata files
[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   ServerAlias gps-tile.openstreetmap.org
10   ServerAlias *.gps-tile.openstreetmap.org
11   ServerAdmin webmaster@openstreetmap.org
12 <% if port == 443 -%>
13
14   # Enable SSL
15   SSLEngine on
16 <% end -%>
17
18   # Configure location of static files
19   DocumentRoot /srv/gps-tile.openstreetmap.org/html
20
21   # Configure the CGI script that serves the tiles
22   ScriptAlias /lines /srv/gps-tile.openstreetmap.org/updater/tile
23
24   # Temporary redirect for old CGI location
25   RedirectPermanent /gps-lines/tile /lines
26
27   # Setup logging
28   CustomLog /var/log/apache2/access.log combined
29   ErrorLog /var/log/apache2/error.log
30   BufferedLogs on
31
32   # Always set Access-Control-Allow-Origin so that simple CORS requests
33   # will always work and can be cached
34   Header set Access-Control-Allow-Origin "*"
35 </VirtualHost>
36
37 <% end -%>
38 <Directory /srv/gps-tile.openstreetmap.org/html>
39   Options None
40   AllowOverride None
41   Order allow,deny
42   Allow from all
43 </Directory>