]> git.openstreetmap.org Git - chef.git/blob - cookbooks/gps-tile/templates/default/apache.erb
Remove lurien role
[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 gps-tile.openstreetmap.org
7   ServerAlias *.gps-tile.openstreetmap.org
8   ServerAlias gps.tile.openstreetmap.org
9   ServerAlias gps-*.tile.openstreetmap.org
10   ServerAdmin webmaster@openstreetmap.org
11 <% if port == 443 -%>
12
13   # Enable SSL
14   SSLEngine on
15   SSLCertificateFile /etc/ssl/certs/gps-tile.openstreetmap.org.pem
16   SSLCertificateKeyFile /etc/ssl/private/gps-tile.openstreetmap.org.key
17 <% end -%>
18
19   # Configure location of static files
20   DocumentRoot /srv/gps-tile.openstreetmap.org/html
21
22   # Configure the CGI script that serves the tiles
23   ScriptAlias /lines /srv/gps-tile.openstreetmap.org/updater/tile
24
25   # Redirect for ACMI challenge validation
26   RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
27
28   # Temporary redirect for old CGI location
29   RedirectPermanent /gps-lines/tile /lines
30
31   # Setup logging
32   CustomLog /var/log/apache2/access.log combined
33   ErrorLog /var/log/apache2/error.log
34   BufferedLogs on
35
36   # Always set Access-Control-Allow-Origin so that simple CORS requests
37   # will always work and can be cached
38   Header set Access-Control-Allow-Origin "*"
39 </VirtualHost>
40
41 <% end -%>
42 <Directory /srv/gps-tile.openstreetmap.org/html>
43   Options None
44   AllowOverride None
45   Require all granted
46 </Directory>
47
48 <Directory /srv/gps-tile.openstreetmap.org/updater>
49   <Files tile>
50     Require all granted
51   </Files>
52 </Directory>