feat(nginx-reverse-proxy): add custom error pages and update configuration for error handling

This commit is contained in:
2025-06-07 22:10:42 +02:00
parent 01bf71f8d2
commit d969525b58
14 changed files with 445 additions and 0 deletions
@@ -7,6 +7,14 @@ server {
ssl_protocols TLSv1.2 TLSv1.3;
%{ endif ~}
server_name ${fqdn};
# Custom error page for upstream errors
%{ for e in errors ~}
error_page ${e} /errors/${e}.html;
location = /errors/${e}.html {
root /usr/share/nginx/html;
internal;
}
%{ endfor ~}
%{ if custom_snippet != "" ~}
${custom_snippet}
%{ endif ~}
@@ -40,6 +48,7 @@ location = /auth {
%{ for k,v in l.headers ~}
proxy_set_header ${k} ${v};
%{ endfor ~}
proxy_intercept_errors on;
}
%{ endfor ~}
}