I'm trying to make accessible my Webmin through a sub-domain https://webmin.example.com/

I'm using Cloudflare DNS and Cloudflare SSL Certification.

Whenever i type the above URL, it's automatically turns to http://webmin.example.com/

This points to a not existed page, because i only have set a 443 virtual host. I've tried to set the default 80 port in the virtual host, it proxies webmin but again without HTTPS. (Webmin does not allow plain HTTP logins)

Please keep in mind, that i want to use SSL, disabling it is not desirable.

This is my .conf:

<VirtualHost *:443>
ServerName webmin.example.com
ServerAdmin admin@example.com

SSLEngine on
SSLCertificateFile /etc/apache2/ssl/origin.crt
SSLCertificateKeyFile /etc/apache2/ssl/private.key

SSLProxyEngine On
SSLProxyCheckPeerCN on
SSLProxyCheckPeerExpire on

ProxyRequests Off
ProxyPreserveHost On

ProxyPass /
ProxyPassReverse /
  • I have enabled all the necessary apache2 modules for the SSL and proxy.
  • I have the correct DNS and settings in my Cloudflare panel.
  • apachectl configtest returns Syntax OK

Tried to disable webmin SSL by SSL=0 in config. Then i made one more virtual host with port 80 that redirects to https://webmin.example.com/. When i load the URL Clouflare shows BAD GATEWAY and then immediately changes to SSL handshake failed.

Apache Logs:

[Sun Jun 26 02:02:07.591050 2016] [proxy_http:error] [pid 29290] (103)Software caused connection abort: [client ....:56309] AH01102: error reading status line from remote server

[Sun Jun 26 02:02:07.591253 2016] [proxy:error] [pid 29290] [client ....:56309] AH00898: Error reading from remote server returned by /

  • Have you tried setting SSL=0 for Webmin (make sure it listens on localhost only) and then ProxyPass / That is the simplest setup to try before trying anything else.
    – Marki
    Jun 26, 2016 at 0:16
  • thanks, i changed proxypass to http and now its working!
    – PRR21
    Jun 26, 2016 at 1:20

1 Answer 1


In the CloudFlare dashboard you will need to ensure you are using Full SSL instead of Flexible SSL. If not, you can resolve this issue setting SSL=0 for Webmin as suggested in the comment to the question.

Consider installing Mod_CloudFlare on Apache which means Apache works gracefully with CloudFlare (respecting SSL headers, etc).

Full SSL ensures the end-to-end connection is over SSL:

CloudFlare Full SSL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.