From 4c8115d92a42b4ed6b4bf748913ddf5745e73c47 Mon Sep 17 00:00:00 2001
From: jurgenhaas <juergen@paragon-es.de>
Date: Thu, 30 Jul 2020 14:10:52 +0200
Subject: [PATCH] ansible-roles/php#12 Change PHP-FPM, Apache and Netdata
 settings

---
 templates/vhost.conf | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/templates/vhost.conf b/templates/vhost.conf
index a3c9028..e923bd9 100644
--- a/templates/vhost.conf
+++ b/templates/vhost.conf
@@ -41,7 +41,13 @@
 {% endif %}
 
 {% if nextcloud.jail is defined and not php_fpm_socket|default(false) %}
-  ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:{{ nextcloud.jail.port }}/$1
+  <LocationMatch "/fpm-status">
+    Include /etc/apache2/{{ apache_conf_dir }}/global-deny.conf
+    ProxyPass fcgi://127.0.0.1:{{ nextcloud.jail.port }}
+  </LocationMatch>
+  <FilesMatch \.php$>
+    SetHandler "proxy:fcgi://127.0.0.1:{{ nextcloud.jail.port }}"
+  </FilesMatch>
 {% endif %}
 
   DocumentRoot {{ webRoot }}
-- 
GitLab