From d9da3eb9abe1efe2e7c99dfe24ea7bc15b5656c3 Mon Sep 17 00:00:00 2001 From: Fascinated Date: Wed, 5 Jul 2023 00:38:53 +0100 Subject: [PATCH] make it so nginx will only execute php on the upload script. This fixes the uploader from being able to upload any php script and that being able to be executed. --- docker/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/nginx.conf b/docker/nginx.conf index a3da571..e883451 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -24,7 +24,7 @@ http { client_max_body_size 500M; # Will get replaced by the environment variable MAX_UPLOAD_SIZE - location ~ \.php$ { + location upload.php { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$;