include_recipe "apache::ssl"
include_recipe "postgresql"
-include_recipe "git"
package "php5"
package "php5-cli"
apache_module "rewrite"
apache_module "proxy"
apache_module "proxy_fcgi"
+apache_module "proxy_http"
home_directory = data_bag_item("accounts", "nominatim")["home"]
source_directory = "#{home_directory}/nominatim"
supports :status => true, :restart => true, :reload => true
end
-apache_site "nominatim.openstreetmap.org" do
- template "apache.erb"
- directory source_directory
- variables :pools => node[:nominatim][:fpm_pools]
-end
-
-apache_site "default" do
- action [:disable]
-end
-
node[:nominatim][:fpm_pools].each do |name, data|
template "/etc/php5/fpm/pool.d/#{name}.conf" do
source "fpm.conf.erb"
only_if { node[:postgresql][:settings][:defaults][:archive_mode] == "on" }
end
+apache_site "nominatim.openstreetmap.org" do
+ template "apache.erb"
+ directory source_directory
+ variables :pools => node[:nominatim][:fpm_pools]
+end
+
+apache_site "default" do
+ action [:disable]
+end
+
fail2ban_filter "nominatim" do
- failregex '^<HOST> - - \[[^]]+\] "[^"]+" (403|429) '
+ failregex '^<HOST> - - \[[^]]+\] "[^"]+" 429 '
end
fail2ban_jail "nominatim" do