X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/c43bf1368ea4b5daca710654eb48099b8274f585..5f3a5421476c68027c50b821916585ab01f0efa1:/cookbooks/gps-tile/templates/default/apache.erb diff --git a/cookbooks/gps-tile/templates/default/apache.erb b/cookbooks/gps-tile/templates/default/apache.erb index 064e1dc20..adc7a061d 100644 --- a/cookbooks/gps-tile/templates/default/apache.erb +++ b/cookbooks/gps-tile/templates/default/apache.erb @@ -1,19 +1,17 @@ # DO NOT EDIT - This file is being maintained by Chef -<% [80, 443].each do |port| -%> -> + # Basic server configuration - ServerName <%= node[:fqdn] %> + ServerName gps-tile.openstreetmap.org + ServerAlias *.gps-tile.openstreetmap.org 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 -%> + SSLCertificateFile /etc/ssl/certs/gps-tile.openstreetmap.org.pem + SSLCertificateKeyFile /etc/ssl/private/gps-tile.openstreetmap.org.key # Configure location of static files DocumentRoot /srv/gps-tile.openstreetmap.org/html @@ -34,10 +32,37 @@ Header set Access-Control-Allow-Origin "*" -<% end -%> + + # Basic server configuration + ServerName gps-tile.openstreetmap.org + ServerAlias *.gps-tile.openstreetmap.org + ServerAlias gps.tile.openstreetmap.org + ServerAlias gps-*.tile.openstreetmap.org + ServerAdmin webmaster@openstreetmap.org + + # Enable rewriting + RewriteEngine On + + # Redirect for ACME challenge validation + RewriteRule ^/\.well-known/acme-challenge/(.*)$ http://acme.openstreetmap.org/.well-known/acme-challenge/$1 [R=permanent,L] + + # Redirect to https + RewriteRule (.*) https://%{SERVER_NAME}/$1 [R=permanent,L] + + # Setup logging + CustomLog /var/log/apache2/access.log combined + ErrorLog /var/log/apache2/error.log + BufferedLogs on + + Options None AllowOverride None - Order allow,deny - Allow from all + Require all granted + + + + + Require all granted +