From 472bafb9d73c8033dfefab8597c2fa971a48069e Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 11 May 2017 12:49:06 +0200
Subject: [PATCH] Implemented #4653 Add support for HHVM with apache
 mod_proxy_fcgi

---
 server/conf/vhost.conf.master | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master
index 9faa2b1c7b..d5052d8d56 100644
--- a/server/conf/vhost.conf.master
+++ b/server/conf/vhost.conf.master
@@ -406,6 +406,32 @@
 				Alias /hhvm-fcgi {tmpl_var name='document_root'}/cgi-bin/hhvm-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'}
                 FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/hhvm-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket /var/run/hhvm/hhvm.<tmpl_var name='system_user'>.sock -pass-header Authorization
 		</IfModule>
+		<IfModule mod_proxy_fcgi.c>
+			<Directory {tmpl_var name='document_root'}/cgi-bin>
+				<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>
+			<Directory {tmpl_var name='web_document_root'}>
+				<FilesMatch "\.php[345]?$">
+						SetHandler "proxy:unix:/var/run/hhvm/hhvm.<tmpl_var name='system_user'>.sock|fcgi://localhost"
+				</FilesMatch>
+				<FilesMatch "\.hh$">
+						SetHandler "proxy:unix:/var/run/hhvm/hhvm.<tmpl_var name='system_user'>.sock|fcgi://localhost"
+				</FilesMatch>
+			</Directory>
+			<Directory {tmpl_var name='web_document_root_www'}>
+				<FilesMatch "\.php[345]?$">
+						SetHandler "proxy:unix:/var/run/hhvm/hhvm.<tmpl_var name='system_user'>.sock|fcgi://localhost"
+				</FilesMatch>
+				<FilesMatch "\.hh$">
+						SetHandler "proxy:unix:/var/run/hhvm/hhvm.<tmpl_var name='system_user'>.sock|fcgi://localhost"
+				</FilesMatch>
+			</Directory>
+		</IfModule>
 </tmpl_if>
 
 <tmpl_if name="rewrite_enabled">
-- 
GitLab