Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict access to bind url #2

Open
z3ky opened this issue Sep 1, 2021 · 2 comments
Open

Restrict access to bind url #2

z3ky opened this issue Sep 1, 2021 · 2 comments

Comments

@z3ky
Copy link

z3ky commented Sep 1, 2021

Hi
I've just tested your implementation in the v2-files branch. Great work, ist works pretty well. I use a self managed Traefik with a configuration similar to yours provided in the test folder.

However, I have a small problem.
I run some other services on the same machine, all accessible from different URLs. If I use the public ip of the machine, the browser opens JupyterHub. On a regular Hub installation with the default proxy, c.JupyterHub.bind_url prevents this behavior.
Do you think this is also possible with Traefik?

@alexleach
Copy link
Owner

Hi @z3ky, Sorry I've only just seen this issue, I don't know why I didn't get an email notification for this, but I'll check my settings...

Did you manage to get this working? I also have several different services proxied through the same traefik router. Below is a screenshot of part of my traefik dashboard, for instance.

image

Below is part of my config. I guess what you need is the c.TraefikProxy.public_url configuration line?

c.JupyterHub.bind_url = 'https://:443/jupyter'
c.JupyterHub.cleanup_proxy = True
c.JupyterHub.hub_ip = ''
c.JupyterHub.proxy_class = 'traefik_file'
c.TraefikProxy.should_start = False
c.TraefikProxy.public_url = "https://:443/jupyter"

The reason this effectively duplicates c.JupyterHub.bind_url is because I currently just use a default SSL certificate in Traefik, and don't need jupyterhub to manage its own SSL certificate. This implementation may of course change, if / when merged upstream, but for now this is what works for me. 🙂

Hope this helps?

KR, Alex

@z3ky
Copy link
Author

z3ky commented Oct 12, 2021

Thank you for the response, I'll give it a try.
Currently, my Traefik just routes to the configurable-proxy of JupyterHub. But its just a workaround. I will replace configurable-proxy with Traefik again and test public_url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants