How to fix the problem when WHM server SSL certificate for the server hostname is invalid?

https://host.name.here:2087/

i think this may work:

A) REINSTALLING/CHANGING SSL CERTIFICATE FOR ACCESSING WHM/CPANEL/MAIL

One way is to reset certificate from within WHM/Service Configuration/Manage Service SSL Certificates

B) CHANGING IP ADDRESS OF THE HOSTNAME DNS RECORD

vi /var/named/host.name.here.db (example: vi /var/named/host.myhosting.com.db)

Modify IP so it is really the IP of the server on which WHM is running.

Then in same file edit DNS zone serial number (example line: 2014042003 ; serial, todays date+todays), i incremented +1

Then i saved changes and did: service named reload

C) SSL DOMAIN MISMATCH?

see SSL details (clicking padlock icon in the address bar), maybe there is SSL mismatch where the used SSL is made for another domain. One may go to WHM/SSL/Manage SSL hosts , and there set the hostname's domain name as a default SSL. Or install new certificate for hostname (WHM/SSL/Generate/install cert.) - support feature: https://features.cpanel.net/topic/autossl-on-server-hostname-for-apache