Created
July 26, 2018 06:14
-
-
Save Maecenas/67564a5f29a65b178328af708b713a3d to your computer and use it in GitHub Desktop.
Jupyter (Lab) server setup guide. Using Anaconda as python distribution and package management tools, Nginx as reverse proxy, and Docker for distribution.
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
#/etc/nginx/conf.d/hipython.conf | |
upstream hipython { | |
server localhost:8888; | |
} | |
server { | |
listen 80; | |
server_name hipython.your.site; | |
location / { | |
proxy_pass http://hipython; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header Host $host; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "Upgrade"; | |
proxy_http_version 1.1; | |
} | |
location ~ /api/kernels/ { | |
proxy_pass http://hipython; | |
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://hipython; | |
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