From 208a069f90fe68ecf2242b8ef177b1a5a0095f00 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Thu, 06 Nov 2014 04:52:26 -0500
Subject: [PATCH] Merge branch 'master' of http://git.ispconfig.org/ispconfig/ispconfig3
---
server/plugins-available/apache2_plugin.inc.php | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 90f0912..2bf4dfe 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1378,8 +1378,10 @@
$socket_dir = escapeshellcmd($web_config['php_fpm_socket_dir']);
if(substr($socket_dir, -1) != '/') $socket_dir .= '/';
- // User sockets, but not with apache 2.4 as socket support is buggy in that version
- if($data['new']['php_fpm_use_socket'] == 'y' && $app->system->getapacheversion() < 2.4){
+ $apache_modules = $app->system->getapachemodules();
+
+ // Use sockets, but not with apache 2.4 on centos (mod_proxy_fcgi) as socket support is buggy in that version
+ if($data['new']['php_fpm_use_socket'] == 'y' && in_array('fastcgi_module',$apache_modules)){
$use_tcp = 0;
$use_socket = 1;
} else {
@@ -2821,7 +2823,10 @@
$tpl->newTemplate('php_fpm_pool.conf.master');
$tpl->setVar('apache_version', $app->system->getapacheversion());
- if($data['new']['php_fpm_use_socket'] == 'y'){
+ $apache_modules = $app->system->getapachemodules();
+
+ // Use sockets, but not with apache 2.4 on centos (mod_proxy_fcgi) as socket support is buggy in that version
+ if($data['new']['php_fpm_use_socket'] == 'y' && in_array('fastcgi_module',$apache_modules)){
$use_tcp = 0;
$use_socket = 1;
if(!is_dir($socket_dir)) $app->system->mkdirpath($socket_dir);
--
Gitblit v1.9.1