nginx configuration for Jupyter-notebook

NginX configuration

 


upstream notebook {
    server localhost:8888;
}
server{
listen 80;
server_name xyz.abc.com;
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;
  }
}

https://jupyter.readthedocs.io/en/latest/tryjupyter.html 1https://jupyter.readthedocs.io/en/latest/tryjupyter.html
https://github.com/jupyter/jupyter/wiki/Jupyter-kernels 2https://github.com/jupyter/jupyter/wiki/Jupyter-kernels
https://aichamp.wordpress.com/2017/06/13/setting-up-jupyter-notebook-server-as-service-in-ubuntu-16-04/ 3https://aichamp.wordpress.com/2017/06/13/setting-up-jupyter-notebook-server-as-service-in-ubuntu-16-04/
http://www.albertauyeung.com/post/setup-jupyter-nginx-supervisor/ 4http://www.albertauyeung.com/post/setup-jupyter-nginx-supervisor/
https://aptro.github.io/server/architecture/2016/06/21/Jupyter-Notebook-Nginx-Setup.html 5https://aptro.github.io/server/architecture/2016/06/21/Jupyter-Notebook-Nginx-Setup.html
https://dev-ops-notes.com/docker/setup-jupyter-behind-nginx-proxy/ 6https://dev-ops-notes.com/docker/setup-jupyter-behind-nginx-proxy/

References   [ + ]

1. https://jupyter.readthedocs.io/en/latest/tryjupyter.html
2. https://github.com/jupyter/jupyter/wiki/Jupyter-kernels
3. https://aichamp.wordpress.com/2017/06/13/setting-up-jupyter-notebook-server-as-service-in-ubuntu-16-04/
4. http://www.albertauyeung.com/post/setup-jupyter-nginx-supervisor/
5. https://aptro.github.io/server/architecture/2016/06/21/Jupyter-Notebook-Nginx-Setup.html
6. https://dev-ops-notes.com/docker/setup-jupyter-behind-nginx-proxy/