Https reverse proxy to docker container

Hi there!

I am experimenting with Virtualmin as a possible replacement for ISPConfig for a few days now.
Yesterday I had the idea to create a website in virtualmin and use it as a reverse proxy to a docker container, so I can reach the container with a subdomain.

So I installed Rocketchat on port 3000 and created a new server named like chat.domain.com

When I type

  • h-ttp://123.123.123.123:3000
    *h-ttp://domain.com:3000
    I can reach Rocketchat

What I want to achieve:
type in h-ttp://chat.domain.com or h-ttps://chat.domain.com and then use Rocketchat under this domains and in case I type http, then automatic redirect to https.

Can anybody tell me how I can da that? I am experimenting with apache directives and the website redirect option for a while now, but it isn’t working… Maybe some of you guys are more clever than I am.

Thanks in advance!

Okay I did it by myself. Heres what to do:

Activate this configuration and thats it, Docker container with subdomain and ssl by default.

1 Like