Created
November 26, 2021 07:15
-
-
Save WangYihang/a87d38c39a08add783642db85f470538 to your computer and use it in GitHub Desktop.
This file contains 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 jupyter-notebook { | |
server localhost:8888; | |
} | |
server{ | |
listen 8080; | |
server_name notebook.example.com; | |
location / { | |
proxy_pass http://jupyter-notebook; | |
proxy_set_header Host $host; | |
} | |
location ~ /api/kernels/ { | |
proxy_pass http://jupyter-notebook; | |
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; | |
} | |
location ~ /terminals/ { | |
proxy_pass http://jupyter-notebook; | |
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment