TLJH URL always prefixes path with "/hub/"

I had a similar issue last year, though my server is now up and running on a local server on campus. However, when I tried to set base_url to /jupyter and ran sudo tljh-config reload proxy, navigation to domain.com/jupyter redirects to domain.com/hub/jupyter and throws a 404 error.

In an effort to prepare the server for student use, I removed (unset) this line and reloaded both hub and proxy, but this setting remains in effect.

My questions are:

  • How can I remove this setting?
  • How can I get this setup to work?

My end goal is to have TLJH accessible at domain.com/jupyter and another web application to be accessible at domain.com/webapp, which should run over another port. I think I can do this configuration using the custom TOML files, but I need the /hub redirection to work correctly before I can proceed.

This is using a new install of TLJH (fresh install on 2020-01-20) on Ubuntu 04.2018.

Are you running a separate proxy such as Nginx or Apache in front of your hub?

Yes… on a separate server. We had to work with campus IT to get traffic through the firewall, so traffic is routed through their gateway to a VM running nginx which proxies traffic to the machine running TLJH. That setup is as simple as I could make it, literally terminates the TLS connection and passes everything through to the TLJH server on port 443.

Running wget 127.0.0.1 --no-check-certificate on the TLJH server returns

--2021-02-03 16:44:37--  http://127.0.0.1/
Connecting to 127.0.0.1:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://127.0.0.1:443/ [following]
--2021-02-03 16:44:37--  https://127.0.0.1/
Connecting to 127.0.0.1:443... connected.
    WARNING: certificate common name ‘’ doesn't match requested host name ‘127.0.0.1’.
HTTP request sent, awaiting response... 302 Found
Location: /hub/jupyter/ [following]
--2021-02-03 16:44:37--  https://127.0.0.1/hub/jupyter/
Reusing existing connection to 127.0.0.1:443.
HTTP request sent, awaiting response... 404 Not Found
2021-02-03 16:44:37 ERROR 404: Not Found.

Because of this, I don’t think it’s an issue with the separate proxy setup…