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
| server { listen 80; listen 443 ssl http2; server_name jupyter.ifan.host; ssl_certificate /opt/openresty/nginx/cert/ifan/fullchain.cer; ssl_certificate_key /opt/openresty/nginx/cert/ifan/ifan.host.key; ssl_protocols TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; access_log /var/log/openresty/nginx/logs/jupyter.access.log; error_log /var/log/openresty/nginx/logs/jupyter.error.log; location / { proxy_http_version 1.1; proxy_set_header Accept-Encoding gzip; # WebSocket support proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade";
proxy_read_timeout 120s; proxy_next_upstream error; proxy_set_header Host $http_host; proxy_redirect off; proxy_buffering off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_connect_timeout 3s; proxy_pass http://localhost:8888; } }
|