Created
January 23, 2017 15:46
-
-
Save mathewcohle/56d1570ab53b0950f8166ee21650f903 to your computer and use it in GitHub Desktop.
Nginx config file to set up jupyter notebook server behind it.
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 notebook { | |
server localhost:8888; | |
} | |
server{ | |
listen 80; | |
location / { | |
proxy_pass http://notebook; | |
proxy_set_header Host $host; | |
} | |
location ~ /api/kernels/ { | |
proxy_pass http://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://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
Source https://aptro.github.io/server/architecture/2016/06/21/Jupyter-Notebook-Nginx-Setup.html