Im accessing zPanel simply via my server IP. I wanted to submit my login credentials via secure socket layer (encrypted)

https://myzpanelserverip/

This is what worked in my case (i have centos/redhat):

# yum install openssl mod_ssl -y
(it can update Apache automatically!. If have Debian based Linux, then use apt-get instead of yum)

# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -out /etc/pki/tls/certs/zpanel.crt -keyout /etc/pki/tls/certs/zpanel.key
(generate self signed certifficate, hit Enter keys)

# echo "SSLCertificateFile /etc/pki/tls/certs/zpanel.crt" >> /etc/httpd/conf.d/ssl.conf;echo "SSLCertificateKeyFile /etc/pki/tls/certs/zpanel.key" >> /etc/httpd/conf.d/ssl.conf

# service httpd restart
(if have Debian based Linux, then use: service apache2 restart)

Then login your zPanel via http, go to "Admin" top menu. Then "Module Admin", then "Apache Config", then into the "Global ZPanel Entry", field, add:

Redirect Permanent / https://YOURZPANELSERVERIP/

It started working for me