updated nginx conf file

This commit is contained in:
Luis Aleixo 2023-02-23 10:46:14 +01:00
parent b791581fe8
commit b941808317

View file

@ -93,6 +93,25 @@ http {
absolute_redirect off;
rewrite ^/voila/(.*)$ /voila-server/voila/$1 redirect;
location /CO2-voila-server/ {
proxy_intercept_errors on;
# Anything under voila-server or CO2-app is authenticated.
auth_request /auth/probe;
error_page 401 = @error401;
error_page 404 = @proxy_404_error_handler;
# caimira-co2-app is the name of the voila server in each of docker-compose,
# caimira-test.web.cern.ch and caimira.web.cern.ch.
proxy_pass http://caimira-co2-app:8080/CO2-voila-server/;
}
rewrite ^/CO2-app$ /CO2-voila-server/voila/render/caimira.ipynb last;
rewrite ^/(files/static)/(.*)$ /CO2-voila-server/voila/$1/$2 last;
# Before implementing the nginx router we could access /voila/render/caimira.ipynb.
# Redirect this (and all other) URLs to the new scheme.
rewrite ^/voila/(.*)$ /CO2-voila-server/voila/$1 redirect;
location / {
# By default we have no authentication.
proxy_pass http://caimira-webservice:8080;