From: Tom Hughes Date: Tue, 10 Jun 2014 12:37:45 +0000 (+0100) Subject: Workaround horrendous ProxyPassMatch silliness X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/781339f82377ca12b2ad13ba4b922f5d3028aaf8?hp=08e15b969def6ab80697e8830ae401ac1f197e25 Workaround horrendous ProxyPassMatch silliness --- diff --git a/cookbooks/nominatim/templates/default/apache.erb b/cookbooks/nominatim/templates/default/apache.erb index eeda42062..3d47b428f 100644 --- a/cookbooks/nominatim/templates/default/apache.erb +++ b/cookbooks/nominatim/templates/default/apache.erb @@ -33,31 +33,23 @@ <% end -%> - + <% if node[:lsb][:release].to_f >= 14.04 -%> - ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:<%= @pools[:www][:port ]%>/ - ProxyPassMatch ^/(.*\.phpx(/.*)?)$ fcgi://127.0.0.1:<%= @pools[:www][:port ]%>/ - ProxyPassMatch ^/(.*\.phpj(/.*)?)$ fcgi://127.0.0.1:<%= @pools[:www][:port ]%>/ + ProxyPassMatch fcgi://127.0.0.1:<%= @pools[:www][:port ]%>/ <% else -%> - AddHandler fcgi:/var/run/php5-fpm-www.sock .php - AddHandler fcgi:/var/run/php5-fpm-www.sock .phpx - AddHandler fcgi:/var/run/php5-fpm-www.sock .phpj + SetHandler fcgi:/var/run/php5-fpm-www.sock <% end -%> - + <% @pools.each do |name,details| -%> Alias /pool-<%= name %>/ "<%= @directory %>/website/" - > + /.*\.php[xj]?(/.*)?$> <% if node[:lsb][:release].to_f >= 14.04 -%> - ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:<%= details[:port ]%>/ - ProxyPassMatch ^/(.*\.phpx(/.*)?)$ fcgi://127.0.0.1:<%= details[:port ]%>/ - ProxyPassMatch ^/(.*\.phpj(/.*)?)$ fcgi://127.0.0.1:<%= details[:port ]%>/ + ProxyPassMatch fcgi://127.0.0.1:<%= details[:port ]%>/ <% else -%> - AddHandler fcgi:/var/run/php5-fpm-<%= name %>.sock .php - AddHandler fcgi:/var/run/php5-fpm-<%= name %>.sock .phpx - AddHandler fcgi:/var/run/php5-fpm-<%= name %>.sock .phpj + SetHandler fcgi:/var/run/php5-fpm-<%= name %>.sock <% end -%> - + <% end -%> Redirect 420 /pool-block/