Manual https - how to forward from http?

Hello - using manual https (not letsencrypt) - I’ve got it so that https:// works fine, however an annoying thing that I’m finally tackling is that http:// just hangs. It appears to attempt to forward to https::8443 instead of :443.

I read through all the code and docs I could for proxy and http-configurable-proxy and have tried using helm to modify the proxy command to include

  --redirect-port <redirect-port>    Redirect HTTP requests on this port to the server on HTTPS
  --redirect-to <port>               Redirect HTTP requests from --redirect-port to this port

specifying 80 and 443 respectively seems to have no effect. Any ideas?

@yuvipanda

---
proxy:
  https: 
    enabled: True
    hosts: <myserver.org>
    type: manual
    manual:
      key: |
        -----BEGIN PRIVATE KEY-----
        <mykey>
        -----END PRIVATE KEY-----
      cert: |
        -----BEGIN CERTIFICATE-----
        <mycert chain>
        -----END CERTIFICATE-----

  secretToken: "<blar blar>"
  command: "configurable-http-proxy --redirect-port 80 --redirect-to 443" 
singleuser:
  defaultUrl: "/lab"
  image:
    name: jupyter/base-notebook
    tag: latest
  storage:
    type: "static"
    static:
      pvcName: "efs-persist"
      subPath: 'home/{username}'
  extraEnv:
    CHOWN_HOME: 'yes'
  uid: 0
  fsGid: 0
  cmd: "start-singleuser.sh"

seeing this in the debug output of helm install:

          command:
            - configurable-http-proxy
            - --ip=0.0.0.0
            - --api-ip=0.0.0.0
            - --api-port=8001
            - --default-target=http://$(HUB_SERVICE_HOST):$(HUB_SERVICE_PORT)
            - --error-target=http://$(HUB_SERVICE_HOST):$(HUB_SERVICE_PORT)/hub/error
            - --port=8443
            - --redirect-port=8000
            - --ssl-key=/etc/chp/tls/tls.key
            - --ssl-cert=/etc/chp/tls/tls.crt

Ignoring my values that I set?

Thanks for opening this here!

I suspect this is the same as https://github.com/jupyterhub/zero-to-jupyterhub-k8s/pull/1337 which was fixed recently. What do you think?

1 Like

you’re right, very elite googling my friend.