From 7783e1a557bc4c99d04b7342f98d87d6d6e6978e Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 11 Jan 2024 05:51:26 +0000 Subject: [PATCH] again --- docker/nginx.conf | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docker/nginx.conf b/docker/nginx.conf index c5ba301..78e9a46 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -39,6 +39,12 @@ http { client_max_body_size 500M; # Will get replaced by the environment variable MAX_UPLOAD_SIZE + # Fallback 404 page + location = /not-found.html { + internal; + root /tmp/public; + } + # Upload endpoint location /upload.php { try_files $uri =404; @@ -60,15 +66,10 @@ http { open_file_cache_min_uses 1; open_file_cache_errors on; + error_page 404 /not-found.html; + # Serve the file directly from disk try_files $uri $uri/ =404; } - - # Fallback 404 page - location = /404.html { - internal; - root /tmp/public; - } - error_page 404 /404.html; } } \ No newline at end of file