From 00af520a37072c46110a03bf9500f939b30f54f5 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Mon, 23 Jan 2017 20:04:10 +0100
Subject: [PATCH] Set correct PHP 7 socket path on Ubuntu 16.04 in apps vhost.

---
 install/lib/installer_base.lib.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 5771c078ed..2e1b5fb15d 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2076,6 +2076,11 @@ class installer_base {
 			// SSL in apps vhost is off by default. Might change later.
 			$content = str_replace('{ssl_on}', 'off', $content);
 			$content = str_replace('{ssl_comment}', '#', $content);
+			
+			// Fix socket path on PHP 7 systems
+			if(file_exists('/var/run/php/php7.0-fpm.sock')) {
+				$content = str_replace('/var/run/php5-fpm.sock', '/var/run/php/php7.0-fpm.sock', $content);
+			}
 
 			wf($vhost_conf_dir.'/apps.vhost', $content);
 
-- 
GitLab