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; + } + +} +