From fd3a8878eef46e4c20822ff673022c80eaa9b0b2 Mon Sep 17 00:00:00 2001 From: Giles Westwood Date: Mon, 25 Nov 2024 14:29:41 +0000 Subject: [PATCH] add missing nginx config for new container --- nginx/conf.d/default.conf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 nginx/conf.d/default.conf diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf new file mode 100644 index 000000000..957735d74 --- /dev/null +++ b/nginx/conf.d/default.conf @@ -0,0 +1,24 @@ +server { + listen 80; + server_name _; + + # redirect language code dirs to an index.html dir + # + if (!-f $request_filename) { + rewrite "^\/orcid-web-frontend\/([a-z]{2}(_[A-Za-z]{2})?)\/.*" /orcid-web-frontend/$1/index.html last; + } + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + } + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + +} +