Created
March 23, 2021 13:57
-
-
Save kwsp/34ad3f5ede80fded2740dbf45ffd87a7 to your computer and use it in GitHub Desktop.
Nginx jupyter lab proxy setup. Use CertBot to get SSL encryption.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream nb { | |
| server 10.19.0.10:1234; | |
| } | |
| server { | |
| server_name example.com; | |
| location / { | |
| proxy_pass http://nb; | |
| proxy_set_header Host $host; | |
| } | |
| location ~ (/api/kernels/|/terminals/) { | |
| proxy_pass http://nb; | |
| proxy_set_header Host $host; | |
| # websocket support | |
| proxy_http_version 1.1; | |
| proxy_set_header Upgrade "websocket"; | |
| proxy_set_header Connection "Upgrade"; | |
| proxy_read_timeout 86400; | |
| } | |
| client_max_body_size 50M; | |
| error_log /var/log/nginx/error.log; | |
| listen 80; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment