diff --git a/install/tpl/apache_apps.vhost.master b/install/tpl/apache_apps.vhost.master
index 4930e253f98fddd7ebf6b1d34cc6cad147c7b008..ee1b693097a200505f42c7a7da3313b134d016b9 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 47d35304f609f4e4e3405d06ad33c46e146dce3a..d533f7b3c0a6f3dcbde989b93f39a0a8e37854c0 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