-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjupyter.conf
41 lines (37 loc) · 1.14 KB
/
jupyter.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
upstream notebook {
server 127.0.0.1:8888;
}
# https://nginx.org/en/docs/http/websocket.html
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 443 ssl;
ssl_certificate /root/nginx-cert.pem;
ssl_certificate_key /root/nginx-key.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://notebook;
proxy_set_header Host $host;
# no limit
client_max_body_size 0;
}
location ~ /api/kernels/ {
proxy_pass http://notebook;
proxy_set_header Host $host;
# websocket support
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "Upgrade";
}
location ~ /terminals/ {
proxy_pass http://notebook;
#proxy_set_header Host $host;
# websocket support
proxy_http_version 1.1;
proxy_set_header Upgrade "websocket";
proxy_set_header Connection "Upgrade";
}
}