X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/f30d59e20c5c515986a14c86afbbc7f164ee1eb0..e3ea52a50427f196e693043a957650f99d34dbae:/cookbooks/gps-tile/templates/default/apache.erb?ds=sidebyside diff --git a/cookbooks/gps-tile/templates/default/apache.erb b/cookbooks/gps-tile/templates/default/apache.erb index 7572327c3..9adf707dd 100644 --- a/cookbooks/gps-tile/templates/default/apache.erb +++ b/cookbooks/gps-tile/templates/default/apache.erb @@ -1,12 +1,18 @@ # DO NOT EDIT - This file is being maintained by Chef - + # Basic server configuration - ServerName <%= node[:fqdn] %> - ServerAlias gps-tile.openstreetmap.org + 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 SSL + SSLEngine on + 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 @@ -17,7 +23,7 @@ RedirectPermanent /gps-lines/tile /lines # Setup logging - CustomLog /var/log/apache2/access.log combined + CustomLog /var/log/apache2/access.log combined_extended ErrorLog /var/log/apache2/error.log BufferedLogs on @@ -26,9 +32,37 @@ Header set Access-Control-Allow-Origin "*" + + # 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_extended + ErrorLog /var/log/apache2/error.log + BufferedLogs on + + Options None AllowOverride None - Order allow,deny - Allow from all + Require all granted + + + + + Require all granted +