nominatim: add read timeout to apache
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 24 Apr 2017 12:10:18 +0000 (14:10 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 24 Apr 2017 12:10:18 +0000 (14:10 +0200)
cookbooks/nominatim/recipes/default.rb
cookbooks/nominatim/templates/default/apache.erb

index 19e48909f9f0bfb4c8f19f537222ac8a0ccbac60..a8009759ff3dba77926ab82870173bf54b2d8b5e 100644 (file)
@@ -306,6 +306,7 @@ apache_module "proxy"
 apache_module "proxy_fcgi"
 apache_module "proxy_http"
 apache_module "headers"
+apache_module "reqtimeout"
 
 service "php7.0-fpm" do
   action [:enable, :start]
@@ -357,7 +358,7 @@ web_servers = search(:node, "recipes:web\\:\\:frontend").collect do |n| # ~FC010
 end.flatten
 
 fail2ban_filter "nominatim" do
-  failregex '^<HOST> - - \[\] "[^"]+" (400|429) '
+  failregex '^<HOST> - - \[\] "[^"]+" (408|429) '
 end
 
 fail2ban_jail "nominatim" do
index b79e76dbee2ebb81fcc47ff5659aa2a5c7b9cb3a..652fd93a334251e9a3133f1d3a4f2e5062dc5b8e 100644 (file)
@@ -25,6 +25,8 @@
     # Remove Proxy request header to mitigate https://httpoxy.org/
     RequestHeader unset Proxy early
 
+    RequestReadTimeout header=15-30,MinRate=500 body=15-30,MinRate=500
+
     CustomLog /var/log/apache2/nominatim.openstreetmap.org-access.log combined
     ErrorLog /var/log/apache2/nominatim.openstreetmap.org-error.log