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

SSL redirection after login not enabled #18

Open
amarchino opened this issue Jan 27, 2022 · 0 comments
Open

SSL redirection after login not enabled #18

amarchino opened this issue Jan 27, 2022 · 0 comments

Comments

@amarchino
Copy link
Contributor

Greetings.

In trying to reverse proxy the Webmin instance behind a Traefik instance, which works as a SSL terminator for the connection, the present configuration does not seem to work.

More specifically, the proxy is achieved by declaring the Webmin instance as not-SSL-enabled (since that is the role of Traefik), but the redirect rules do not respect the protocol. switching from https back to http since that protocol is the one seen by Webmin.

Following is the relevant part of the Docker Compose configuration:

version: '3'

services:
  traefik:
    image: traefik:v2.6
    networks:
      - common
    [...]
  webmin:
    image: eafxx/bind
    ports:
      - "53:53/tcp"
      - "53:53/udp"
    environment:
      - WEBMIN_ENABLED=true
      - WEBMIN_INIT_SSL_ENABLED=false
      - WEBMIN_INIT_REFERERS=my.custom.domain
      - WEBMIN_INIT_REDIRECT_PORT=443
    labels:
      - "traefik.http.routers.webmin.rule=Host(`my.custom.domain`)"
      - "traefik.enable=true"
      - "traefik.http.services.webmin.loadbalancer.server.port=10000"
      - "traefik.http.routers.webmin.tls=true"
    networks:
      - common

networks:
  common:

After opening correctly the login page on https://my.custom.domain, the login redirects back to http://my.custom.domain:443 which is incorrect.

As explained in this issue comment on the webmin repository, this can be achieved by using some more parameters, namely redirect_ssl, webprefixnoredir and relative_redir.

I have a pull request againts this issue, which I shall upload.
It would be truly easy to simply build a new image using this as a base and simply patching the issue, but that would not be good etiquette for the Open Source community. would it?

Thanks for the awesome work!

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

1 participant