From 781339f82377ca12b2ad13ba4b922f5d3028aaf8 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Tue, 10 Jun 2014 13:37:45 +0100 Subject: [PATCH] Workaround horrendous ProxyPassMatch silliness --- .../nominatim/templates/default/apache.erb | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) 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/ -- 2.39.5