jupyter的nginx配置:
server {
listen 443 ssl;
server_name jupyter.qiql.net;
access_log logs/host-https.jupyter.qiql.net.access.log main;
ssl_certificate /etc/letsencrypt/live/qiql.net/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/qiql.net/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/qiql.net/chain.pem;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-Scheme $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://127.0.0.1:7002;
client_max_body_size 40G;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 120s;
proxy_next_upstream error;
# proxy_redirect off;
proxy_buffering off;
}
error_page 500 502 503 504 /50x.html;
location /50x.html {
root /usr/local/nginx/1.23.0/html;
}
}