Introduction:
In Apache 2.4 in a Vhost in order to be able to proxy to a backend with HTTPS using either a self-signed or expired certificate on the backend we need to include the following directives:
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
You also need to enable the required Apache2 modules as follows:
a2enmod proxy
a2enmod proxy_http
a2enmod proxy_connect
service apache2 restart
Example when using Apache 2.4 to proxy to Webmin port 10000:
RewriteEngine On
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
RewriteRule ^/(.*) https://127.0.0.1:10000/$1 [P]
ProxyPassReverse / https://127.0.0.1:10000