dockur / windows

Windows inside a Docker container.
MIT License
28.39k stars 1.96k forks source link

[Question]: how to enable SSL (HTTPS) on docker? #827

Open RedaBousserhane opened 3 weeks ago

RedaBousserhane commented 3 weeks ago

Is your question not already answered in the FAQ?

Is this a general question and not a technical issue?

Question

how to enable SSL (HTTPS) on docker ?

jccm6 commented 5 days ago

Hi! I'm not an expert about it but you need to set up a reverse proxy like Traefik. Then you need to configure your domain to the tag or name of the container you want to redirect in the compose.yml file. Traefik use a open SSL provider to set a https with the domain you set.

ehnwebmaster commented 1 day ago

Or you can use nginx or apache reverse proxy

<VirtualHost 127.0.0.1:443>
    ServerName windows.elhacker.net
    SSLEngine On
    SSLCertificateFile /home/ssl.cert
    SSLCertificateKeyFile /home/ssl.key

    ProxyRequests Off
    SSLProxyEngine on
    SSLProxyVerify none 
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off

    ProxyPreserveHost On
    ProxyPass         / http://localhost:8006/
    ProxyPassReverse  / http://localhost:8006/
</VirtualHost>