jupyterhub

JupyterHub with Apache proxy pass


NOTA

ver JupyterHubWn3

install Apache modules from

https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension(external link)

Configure apache

edit the file /etc/apache2/sites-enabled/000-default.conf
Our Jupyterhub was configure in the server 10.0.0.5 in the port 80, if you have other port just change 10.0.0.5:your_port

Redirect /jupyter /jupyter/
    ProxyVia On
    ProxyRequests Off
<Location /jupyter>
    ProxyPass  http://10.0.0.5
    ProxyPassReverse  http://10.0.0.5
    ProxyPreserveHost On

    Header edit Origin "gfif.udea.edu.co" 10.0.0.5
</Location>
<Location /hub>
    ProxyPass  http://10.0.0.5/hub
    ProxyPassReverse  http://10.0.0.5/hub
</Location>
<Location /login>
    ProxyPass  http://10.0.0.5/login
    ProxyPassReverse  http://10.0.0.5/login
</Location>

<Location /user>
    ProxyPass  http://10.0.0.5/user
    ProxyPassReverse  http://10.0.0.5/user
    ProxyPreserveHost On
    Header edit Origin "gfif.udea.edu.co" 10.0.0.5
    Header edit Referrer "gfif.udea.edu.co" 10.0.0.5
    RequestHeader edit Referrer "gfif.udea.edu.co" 10.0.0.5
</Location>

ProxyPass /api/kernels ws://10.0.0.5/api/kernels
ProxyPassReverse /api/kernels http://10.0.0.5/api/kernels

ProxyPass /api/routes ws://10.0.0.5/api/routes
ProxyPassReverse /api/routes http://10.0.0.5/api/routes


<Proxy *>
        Options FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
</Proxy>
<Location ~ "/(user/[^/]*)/(api/kernels/[^/]+/channels|terminals/websocket)/?">
        ProxyPass ws://10.0.0.5
        ProxyPassReverse ws://10.0.0.5
</Location>




El documento original está disponible en https://clustercien.udea.edu.co/web/tiki-index.php?page=jupyterhub