我在Kubernetes集群内部运行一个运行Nyxx反向代理服务器的JupyterLab。
我正确设置了反向代理,这是我的配置文件:
server {
listen 80;
server_name localhost;
error_log /var/log/nginx/error.log info;
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;
}
location ~* ^/jupyter/(.*)$ {
rewrite /(.*) /jupyter/$1 break;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
# websocket support
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "Upgrade";
proxy_read_timeout 86400;
proxy_pass http://jupyter.default.svc.cluster.local:8888/$1$is_args$args;
resolver kube-dns.kube-system;
}
location ~* ^/jupyter/terminals/(.*)$ {
proxy_pass http://jupyter.default.svc.cluster.local:8888/$1$is_args$args;
proxy_set_header Host $host;
# websocket support
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "Upgrade";
proxy_read_timeout 86400;
}
}
一切似乎都可行,包括与内核的websockets连接。但是有一个问题,我不能重命名目录(!?)。我可以很好地重命名文件,可以在JupyterLab中打开一个终端窗口,并使用mv
重命名目录,但是我不能在JupyterLab窗口中完成它。
有人可以帮我调试吗?