diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 7ecbb76109110f0d85945626168ecbfa0cccb7b3..6557a2d6fb98ca1a500118459b34d61089d4718e 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1561,15 +1561,19 @@ class apache2_plugin { } } + $socket_dir = escapeshellcmd($web_config['php_fpm_socket_dir']); + if($default_php_fpm){ $pool_dir = escapeshellcmd($web_config['php_fpm_pool_dir']); } else { $pool_dir = $custom_php_fpm_pool_dir; + // create dedicated socket dir for each php version, e.g. /var/lib/php7.2-fpm/, /var/lib/php7.3-fpm/ + $socket_dir = str_replace(array_slice(explode("/", $socket_dir), -1)[0], $custom_php_fpm_init_script, $socket_dir); } + $pool_dir = trim($pool_dir); if(substr($pool_dir, -1) != '/') $pool_dir .= '/'; $pool_name = 'web'.$data['new']['domain_id']; - $socket_dir = escapeshellcmd($web_config['php_fpm_socket_dir']); if(substr($socket_dir, -1) != '/') $socket_dir .= '/'; if($data['new']['php_fpm_use_socket'] == 'y'){