Letsencrypt SSL Installation for Hostname – How to guide
This is guide for cwp versions 0.9.8.2xx with autoSSL

In cwp.admin left menu go to –> CWP Settings –> Change Hostname save there your hostname.

SSL will be automatically installed, the only condition is that you have A records set for your hostname.
Please note that the hostname should be subdomain and NOT main domain.

For http:// to https:// redirect you can create this htaccess file:
/usr/local/apache/htdocs/.htaccess

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


To disable redirect simply delete that file.

Manually or custom certificate
You can also manually replace certificate with your own certificate
ssl_certificate with bundle (if any): /etc/pki/tls/certs/hostname.crt
ssl_certificate_key: /etc/pki/tls/private/hostname.key

this certificate files are used for cwp ports 2031,2087,2302,2304,2096:
Admin panel, user panel, roundcube, phpMyAdmin, phpPgAdmin, cwp api