From e9406a20f2d38ab57868423629e9edd1a3fefdd5 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Thu, 23 Mar 2023 19:18:39 +0100 Subject: [PATCH] readd php interpretation to php-enabled customers/domains in directory protection, fixes #1118 Signed-off-by: Michael Kaufmann --- lib/Froxlor/Cron/Http/Nginx.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Froxlor/Cron/Http/Nginx.php b/lib/Froxlor/Cron/Http/Nginx.php index e52de66d..3db34e96 100644 --- a/lib/Froxlor/Cron/Http/Nginx.php +++ b/lib/Froxlor/Cron/Http/Nginx.php @@ -1040,6 +1040,9 @@ class Nginx extends HttpConfigBase $path_options .= "\t\t" . 'auth_basic_user_file ' . FileDir::makeCorrectFile($single['usrf']) . ';' . "\n"; if ($domain['phpenabled_customer'] == 1 && $domain['phpenabled_vhost'] == '1') { $path_options .= "\t\t" . 'index index.php index.html index.htm;' . "\n"; + $path_options .= "\t\t" . 'location ~ ^(.+?\.php)(/.*)?$ {' . "\n"; + $path_options .= "\t\t\t" . 'try_files ' . $domain['nonexistinguri'] . ' @php;' . "\n"; + $path_options .= "\t\t" . '}' . "\n\n"; } else { $path_options .= "\t\t" . 'index index.html index.htm;' . "\n"; }