From: Tom Hughes Date: Sun, 12 Feb 2023 12:31:35 +0000 (+0000) Subject: Use consistent ordering in apache configuration X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/edfa24c94c1abd9eaac401064e3649c37dbefff2 Use consistent ordering in apache configuration --- diff --git a/cookbooks/foundation/templates/default/apache.welcome.erb b/cookbooks/foundation/templates/default/apache.welcome.erb index 586526085..55dc39c18 100644 --- a/cookbooks/foundation/templates/default/apache.welcome.erb +++ b/cookbooks/foundation/templates/default/apache.welcome.erb @@ -13,8 +13,8 @@ RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/ RedirectPermanent / https://<%= @name %>/ - <% unless @aliases.empty? -%> + ServerName <%= @aliases.first %> <% @aliases.drop(1).each do |alias_name| -%> @@ -22,13 +22,13 @@ <% end -%> ServerAdmin webmaster@openstreetmap.org + CustomLog /var/log/apache2/<%= @name %>-access.log combined + ErrorLog /var/log/apache2/<%= @name %>-error.log + SSLEngine on SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key - CustomLog /var/log/apache2/<%= @name %>-access.log combined - ErrorLog /var/log/apache2/<%= @name %>-error.log - RedirectPermanent / https://<%= @name %>/ <% end -%> @@ -44,7 +44,6 @@ SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key - # Let the backend know we are using HTTPS RequestHeader set X-Forwarded-Proto "https" RequestHeader set X-Forwarded-Port "443" diff --git a/cookbooks/stateofthemap/templates/default/apache.jekyll.erb b/cookbooks/stateofthemap/templates/default/apache.jekyll.erb index 586526085..55dc39c18 100644 --- a/cookbooks/stateofthemap/templates/default/apache.jekyll.erb +++ b/cookbooks/stateofthemap/templates/default/apache.jekyll.erb @@ -13,8 +13,8 @@ RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/ RedirectPermanent / https://<%= @name %>/ - <% unless @aliases.empty? -%> + ServerName <%= @aliases.first %> <% @aliases.drop(1).each do |alias_name| -%> @@ -22,13 +22,13 @@ <% end -%> ServerAdmin webmaster@openstreetmap.org + CustomLog /var/log/apache2/<%= @name %>-access.log combined + ErrorLog /var/log/apache2/<%= @name %>-error.log + SSLEngine on SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key - CustomLog /var/log/apache2/<%= @name %>-access.log combined - ErrorLog /var/log/apache2/<%= @name %>-error.log - RedirectPermanent / https://<%= @name %>/ <% end -%> @@ -44,7 +44,6 @@ SSLCertificateFile /etc/ssl/certs/<%= @name %>.pem SSLCertificateKeyFile /etc/ssl/private/<%= @name %>.key - # Let the backend know we are using HTTPS RequestHeader set X-Forwarded-Proto "https" RequestHeader set X-Forwarded-Port "443"