From e4397820f14b0c873487571e3792d27c0fc6f197 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 20 Nov 2023 12:46:19 +0100 Subject: [PATCH] Update the nginx.conf so that it supports nested php file execution --- docker/nginx/nginx.conf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index fe92e3ca..e34c5d09 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -15,10 +15,9 @@ server { try_files $uri $uri/ /index.php?$args; } - location ~ \.php$ { - try_files $uri =404; + location ~ ^.+.php { fastcgi_pass php-fpm:9000; - fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_split_path_info ^(.+?.php)(/.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log"; fastcgi_buffers 16 16k;