+node[:nominatim][:fpm_pools].each do |name, data|
+ template "/etc/php/7.2/fpm/pool.d/#{name}.conf" do
+ source "fpm.conf.erb"
+ owner "root"
+ group "root"
+ mode 0o644
+ variables data.merge(:name => name)
+ notifies :reload, "service[php7.2-fpm]"
+ end
+end
+
+ssl_certificate "nominatim.openstreetmap.org" do
+ domains ["nominatim.openstreetmap.org",
+ "nominatim.osm.org",
+ "nominatim.openstreetmap.com",
+ "nominatim.openstreetmap.net",
+ "nominatim.openstreetmaps.org",
+ "nominatim.openmaps.org"]
+ notifies :reload, "service[apache2]"
+end
+
+apache_site "nominatim.openstreetmap.org" do
+ template "apache.erb"
+ directory build_directory
+ variables :pools => node[:nominatim][:fpm_pools]
+ only_if { node[:nominatim][:state] != "off" }
+end
+
+apache_site "default" do
+ action [:disable]
+end
+
+template "/etc/logrotate.d/apache2" do
+ source "logrotate.apache.erb"