我在端口8000上运行jupyter,在8888上运行jupyter实验室.Nginx配置看起来像(服务器侦听端口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;
}
和
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工作正常
/ jupyterlab没有,但服务器:8888工作正常。
为什么呢?要改变什么?
在8787我有RStudio,有nginx配置:
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;
}
也许我应该删除Jupyter(/ julia /)并只留下JupyterLab?