From 7f2504fe4cc0da96b3535524b2a15d311c927bfb Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Fri, 7 Jul 2023 12:41:02 +0200 Subject: [PATCH] Update the nginx configuration for nested sub-directory support --- docker/nginx/nginx.conf | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index 25c4dc82..a6732a87 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -12,15 +12,12 @@ server { index index.php; # try to serve file directly, fallback to index.php + location / { - try_files $uri /index.php$is_args$args; + try_files $uri $uri/ /index.php$is_args$args =404; } - if (!-e $request_filename) { - rewrite ^.*$ /index.php last; - } - - location ~ \.php$ { + location ~ ^.+.php { fastcgi_pass php-fpm:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;