From a561b9c449abb5315a17a56d5d977836c00e8987 Mon Sep 17 00:00:00 2001 From: Aurelien Vaillant Date: Thu, 17 Aug 2023 19:10:47 +0200 Subject: [PATCH] Try another way with the status code return --- conf/nginx-code-error.conf | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/conf/nginx-code-error.conf b/conf/nginx-code-error.conf index 4b71cff..5807407 100644 --- a/conf/nginx-code-error.conf +++ b/conf/nginx-code-error.conf @@ -4,7 +4,8 @@ location = /error/403.html { internal; } -error_page 404 /error/404.html; -location = /error/404.html { - internal; -} \ No newline at end of file +error_page 404 @error404; + +location @error404 { + rewrite ^ /error/404.html last; +}