Skip to content

Commit

Permalink
Remove directory check, replace with index.html
Browse files Browse the repository at this point in the history
The `try_files` directive in nginx will issue a 301 response if
the given URI (`$uri`) exists as a directory (though this behavior
is not explicitly documented).  We remove the directory check and
replace it with an explicit check for `index.html`.
  • Loading branch information
portante committed Apr 13, 2023
1 parent 9a57940 commit 6c8bb0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/lib/config/nginx.conf
Expand Up @@ -125,7 +125,7 @@ http {
# See if the URI exists, as a file or as a directory, under
# /srv/pbench/public_html and serve that. If it doesn't, just serve
# /dashboard/index.html.
try_files $uri $uri/ /dashboard/index.html;
try_files $uri $uri/index.html /dashboard/index.html;
}

location /static/ {
Expand Down

0 comments on commit 6c8bb0a

Please sign in to comment.