In addition to the proxy_set_header
stuff, I had to adjust my SELinux config:
setsebool -P httpd_read_user_content=on
systemctl restart nginx
I also needed the --ServerApp.allow_remote_access=True
flag:
jupyter-notebook --NotebookApp.token=abcd1234 --ServerApp.allow_remote_access=True
And my nginx.conf
is just like everyone else's:
location / {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 300s;
proxy_connect_timeout 300s;
proxy_send_timeout 300s;
}
Now I can connect to my kernel remotely through Nginx proxy.