1

I have jupyter running on port 8000 and jupyter lab running on 8888. Nginx configuration looks like (server listens on port 80):

location /julia/ {
  proxy_pass http://localhost:8000;
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  access_log /var/log/nginx/julia-access.log;
  error_log  /var/log/nginx/julia-error.log;
}

and

location /jupyterlab/ {
  proxy_pass http://localhost:8888;
  proxy_set_header Host $host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection "upgrade";
  access_log /var/log/nginx/jlab-access.log;
  error_log  /var/log/nginx/jlab-error.log;
}

/julia works fine

/jupyterlab doesn't, but server:8888 works fine.

Why? What to change?

On 8787 I've got RStudio, with nginx config:

location / {
  proxy_pass http://localhost:8787;
  proxy_redirect http://localhost:8787/ $scheme://$host/;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $connection_upgrade;
  proxy_read_timeout 20d;
  access_log /var/log/nginx/rstudio-access.log;
  error_log  /var/log/nginx/rstudio-error.log;
}

Maybe I should remove Jupyter (/julia/) and leave only JupyterLab?

  • In what way does it not work? What is the error message? Check the browser's console and look for clues, post them here, so we can get a better idea too. – ralien Apr 03 '18 at 13:08
  • I have blank page or "too many redirections" in browser when I try to open http://ip/julia ora http://ip/jupyeterlab Only http://ip works fine and shows RStudio. – Łukasz Prokulski Apr 24 '18 at 10:28
  • It is the case with some systems that they only work when they're in the root of the address, e.g. `example.com` (ok) vs `example.com/program` (bad). I cannot test it myself because all instances of Jupyter I have access to run on the root of the domain. However, I've dealt with a similar problem with Sharelatex and got explicit feedback from the developers that it cannot run unless it is the root of the domain. The solution would be `julia.domain.com` and `jupyter.domain.com` instead of `domain.com/julia`, etc. – ralien Apr 24 '18 at 15:03

0 Answers0