From 16568c11f1427c360a7931766079e6eef6c0610a Mon Sep 17 00:00:00 2001 From: Andreas Grundler Date: Mon, 11 May 2015 22:23:49 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20f=C3=BCr=20Apache=202.4=20+=20mod=5Fproxy?= =?UTF-8?q?=5Ffcgi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php b/scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php index d21c6baf..108fe525 100644 --- a/scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php +++ b/scripts/jobs/cron_tasks.inc.http.15.apache_fcgid.php @@ -48,6 +48,16 @@ class apache_fcgid extends apache $php_options_text.= ' SetHandler proxy:unix:' . $php->getInterface()->getSocketFile() . '|fcgi://localhost'. "\n"; $php_options_text.= ' ' . "\n"; + $mypath_dir = new frxDirectory($domain['documentroot']); + + // only create the require all granted if there is not 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"; + $php_options_text.= ' Require all granted' . "\n"; + $php_options_text.= ' ' . "\n"; + } + } else { $php_options_text.= ' FastCgiExternalServer ' . $php->getInterface()->getAliasConfigDir() . $srvName . ' -socket ' . $php->getInterface()->getSocketFile() . ' -idle-timeout ' . Settings::Get('phpfpm.idle_timeout') . "\n"; $php_options_text.= ' ' . "\n";