1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-12 11:14:57 +02:00
dockerfiles/jupyter/nginx.conf
2020-09-09 15:01:34 +08:00

34 lines
972 B
Nginx Configuration File

upstream jupyter_notebook {
server 127.0.0.1:8888;
}
server {
listen 80;
server_name jupyter.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name jupyter.example.com;
ssl_certificate example.com.crt;
ssl_certificate_key example.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://jupyter_notebook;
proxy_set_header Host $host;
}
location ~* /(api/kernels/[^/]+/(channels|iopub|shell|stdin)|terminals/websocket)/? {
proxy_pass http://jupyter_notebook;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "Upgrade";
proxy_read_timeout 86400;
}
}