X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/ab4b82d3ca1eb1be198b331203f3505c4a043b59..d18cd92a98384aebf371376383a4408485f12374:/cookbooks/web/templates/default/apache.frontend.erb?ds=inline diff --git a/cookbooks/web/templates/default/apache.frontend.erb b/cookbooks/web/templates/default/apache.frontend.erb index 4ee4c459c..39f2a6007 100644 --- a/cookbooks/web/templates/default/apache.frontend.erb +++ b/cookbooks/web/templates/default/apache.frontend.erb @@ -26,6 +26,12 @@ ErrorLog /var/log/apache2/error.log SSLCertificateFile /etc/ssl/certs/www.openstreetmap.org.pem SSLCertificateKeyFile /etc/ssl/private/www.openstreetmap.org.key + # Get the real remote IP for requests via a trusted proxy + RemoteIPHeader CF-Connecting-IP +<% @cloudflare.sort.each do |address| -%> + RemoteIPTrustedProxy <%= address %> +<% end -%> + # # Turn on various features # @@ -35,8 +41,7 @@ ErrorLog /var/log/apache2/error.log # # Configure timeouts # - TimeOut 10 - RequestReadTimeout handshake=10-20,MinRate=500 header=10-20,MinRate=500 body=10-120,MinRate=500 + RequestReadTimeout handshake=20-40,MinRate=500 header=20-40,MinRate=500 body=20-120,MinRate=500 LogLevel reqtimeout:info # @@ -118,7 +123,7 @@ ErrorLog /var/log/apache2/error.log FileETag Size ExpiresDefault "access plus 1 year" - Header set Cache-Control "immutable, max-age=31536000" + Header set Cache-Control "immutable, max-age=31536000" "expr=%{REQUEST_STATUS} == 200" #