Skip to content

Commit

Permalink
improve handling of error pages (#146)
Browse files Browse the repository at this point in the history
the current version can handle files missing, but it can not handle
directories missing.

https://docs.stakater.com/mto/main/reference-guides/admin-clusterrole.html
Fails to show a nice looking 404.

https://docs.stakater.com/mto/main/obviously_missing_file
succeeds.

With this change, both should work.

Not sure what internal does or if is needed, have tested on a local
nginx only.
  • Loading branch information
Andtalath authored Jul 30, 2024
1 parent 107ff4f commit dfa3500
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ server {
listen 8080;
root /usr/share/nginx/html/;
index index.html;
error_page 403 404 /404.html;
location = /404.html {
internal;
location / {
try_files $uri $uri/ /404.html;
}
location ~* ^/content/sre/multi-tenant-operator(/(.*))?$ {
return 301 $scheme://docs.stakater.com/mto/$2;
Expand Down

0 comments on commit dfa3500

Please sign in to comment.