From d774b8a76df17f54ae1465465a4d04df0201e26f Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 26 Apr 2018 16:14:48 +0200
Subject: [PATCH] Fixed #5021 PHP7 mod_php support in apps vhost.

---
 install/tpl/apache_apps.vhost.master | 15 +++++++++++++++
 server/conf/apache_apps.vhost.master | 15 +++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/install/tpl/apache_apps.vhost.master b/install/tpl/apache_apps.vhost.master
index 4930e253f9..ee1b693097 100644
--- a/install/tpl/apache_apps.vhost.master
+++ b/install/tpl/apache_apps.vhost.master
@@ -34,6 +34,21 @@
     </Directory>
   </IfModule>
   
+  <IfModule mod_php7.c>
+    DocumentRoot {tmpl_var name='apps_vhost_dir'}
+    AddType application/x-httpd-php .php
+    <Directory {tmpl_var name='apps_vhost_dir'}>
+		Options FollowSymLinks
+		AllowOverride None
+		<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
+		Require all granted
+		<tmpl_else>
+		Order allow,deny
+		Allow from all
+		</tmpl_if>
+    </Directory>
+  </IfModule>
+  
   <IfModule mod_fcgid.c>
     DocumentRoot {tmpl_var name='apps_vhost_dir'}
     SuexecUserGroup ispapps ispapps
diff --git a/server/conf/apache_apps.vhost.master b/server/conf/apache_apps.vhost.master
index 47d35304f6..d533f7b3c0 100644
--- a/server/conf/apache_apps.vhost.master
+++ b/server/conf/apache_apps.vhost.master
@@ -40,6 +40,21 @@
     </Directory>
   </IfModule>
   
+  <IfModule mod_php7.c>
+    DocumentRoot {tmpl_var name='apps_vhost_dir'}
+    AddType application/x-httpd-php .php
+    <Directory {tmpl_var name='apps_vhost_dir'}>
+		Options FollowSymLinks
+		AllowOverride None
+		<tmpl_if name='apache_version' op='>' value='2.2' format='version'>
+		Require all granted
+		<tmpl_else>
+		Order allow,deny
+		Allow from all
+		</tmpl_if>
+    </Directory>
+  </IfModule>
+  
   <IfModule mod_fcgid.c>
     DocumentRoot {tmpl_var name='apps_vhost_dir'}
     SuexecUserGroup ispapps ispapps
-- 
GitLab