From 95a96d46a6b69565c345c3dbc9170c6e3d300428 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Tue, 11 Apr 2023 09:48:26 +0200 Subject: [PATCH] put php-fpm directives in Directory-directive in apache2; fixes #1120 Signed-off-by: Michael Kaufmann --- lib/Froxlor/Cron/Http/ApacheFcgi.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/Froxlor/Cron/Http/ApacheFcgi.php b/lib/Froxlor/Cron/Http/ApacheFcgi.php index 1ebc612b..a5e06ee9 100644 --- a/lib/Froxlor/Cron/Http/ApacheFcgi.php +++ b/lib/Froxlor/Cron/Http/ApacheFcgi.php @@ -126,6 +126,9 @@ class ApacheFcgi extends Apache // mod_proxy stuff for apache-2.4 if (Settings::Get('system.apache24') == '1' && Settings::Get('phpfpm.use_mod_proxy') == '1') { + + $php_options_text .= ' ' . "\n"; + $filesmatch = $phpconfig['fpm_settings']['limit_extensions']; $extensions = explode(" ", $filesmatch); $filesmatch = ""; @@ -141,23 +144,19 @@ class ApacheFcgi extends Apache $php_options_text .= ' ' . "\n"; $mypath_dir = new Directory($domain['documentroot']); - - // only create the require all granted if there is not active directory-protection + // only create the "require all granted" directive if there is no active directory-protection // for this path, as this would be the first require and therefore grant all access if ($mypath_dir->isUserProtected() == false) { - $php_options_text .= ' ' . "\n"; if ($phpconfig['pass_authorizationheader'] == '1') { $php_options_text .= ' CGIPassAuth On' . "\n"; } $php_options_text .= ' Require all granted' . "\n"; $php_options_text .= ' AllowOverride All' . "\n"; - $php_options_text .= ' ' . "\n"; } elseif ($phpconfig['pass_authorizationheader'] == '1') { // allow Pass of Authorization header - $php_options_text .= ' ' . "\n"; $php_options_text .= ' CGIPassAuth On' . "\n"; - $php_options_text .= ' ' . "\n"; } + $php_options_text .= ' ' . "\n"; } else { $addheader = ""; if ($phpconfig['pass_authorizationheader'] == '1') {