Hi,
I have a working setup for JupyterHub that runs in a container as well as another container that deploys a website using Apache. The container with the Apache website has SSL certs and uses ProxyPass and ProxyPassReverse to serve another service that runs in a third separate container.
The website’s URL is https://host-website.ca
. Right now, people have access to the third service when they go to https://host-website.ca/service/
, and I want JupyterHub to show up when people go to https://host-website.ca/hub/
.
In the JupyterHub container, I’ve launched JupyterHub and it says that it’s now running at http://internal-jupyterhub-ip:8000/
, so I was hoping to be able to use ProxyPass and ProxyPassReverse to serve JupyterHub as well by adding these lines in my Apache conf:
ProxyPass /hub/ http://internal-jupyterhub-ip:8000/
ProxyPassReverse /hub/ http://internal-jupyterhub-ip:8000/
My JupyterHub configuration looks something like this:
c.JupyterHub.ip = 'internal-jupyterhub-ip'
c.JupyterHub.port = 8000
c.JupyterHub.hub_ip = '192.168.152.97'
c.JupyterHub.hub_connect_ip = '192.168.152.97'
When I go to https://host-website/hub/
, it shows this:
and looking at the logs for JupyterHub, it appears to be stuck in some redirect loop?
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.399 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 3.41ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.427 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 6.06ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.444 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 3.03ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.462 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.84ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.488 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.77ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.506 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.76ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.534 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.82ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.551 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.75ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.569 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.89ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.599 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.73ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.621 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.74ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.643 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.89ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.659 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.72ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.687 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.77ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.705 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.74ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.724 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.71ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.740 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.69ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.760 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.80ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.780 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.88ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.798 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.77ms
Jul 30 18:06:26 jupyterhub jupyterhub[4550]: [I 2024-07-30 18:06:26.816 JupyterHub log:192] 302 GET / -> /hub/ (@192.168.152.10) 2.73ms
Any help on this would be greatly appreciated!