Re-create Hostname SSL certificates

sozotech

Well-Known Member
Jul 26, 2013
108
5
68
cPanel Access Level
Root Administrator
Hello,

I am in the process of setting up several cPanel VPS servers. I cloned a cPanel server, changed IP and hostname but it still has the original hostname in the SSL certificates and is therefore not trusted when you go to WHM.

I tried running /usr/local/cpanel/bin/checkallsslcerts but this didn't seem to update the service certificates. Is there a way to force it to recreate all the service SSL certificates with the new hostname?

Thanks,
Eric
 
  • Like
Reactions: SecThor

SecThor

Registered
Feb 26, 2017
3
1
3
Austria
cPanel Access Level
Root Administrator
Hello,
Would also be interested in how to solve this w/o any issues.
Had to move some accounts from an old to a new VPS.
But after changing the providers hostname to our hostname, the root SSL certs are still the wrong ones.
Thanks & cheers
Hermann
 

sozotech

Well-Known Member
Jul 26, 2013
108
5
68
cPanel Access Level
Root Administrator
Have you tried resetting the certs from here:
WebHost Manager »Service Configuration »Manage Service SSL Certificates
Actually, I ended up getting a email with the new host certificate in it and did exactly this pasting the new cert to all the services.

However, on a couple other servers I cloned, simply doing a /usr/local/cpanel/bin/checkallsslcerts regenerated the certs without me needing to manually paste them so not sure what the difference was.

Eric
 

SecThor

Registered
Feb 26, 2017
3
1
3
Austria
cPanel Access Level
Root Administrator
Have you tried resetting the certs from here:
WebHost Manager »Service Configuration »Manage Service SSL Certificates
Yes, but these are self-signed certs now.
There is no root cert available for the new hostname, only some old and for the wrong hostname are listed in SSL/TLS >> SSL Storage Manager.
Do I have to wait for a longer time till the cert for the new hostname will be assigned?

BR
Hermann
 

SB-Nick

Well-Known Member
Aug 26, 2008
175
9
68
cPanel Access Level
Root Administrator
Hello,

I would check if the A record exists for the new hostname.
Also if you are doing this through cli, try forcing the hostname with /usr/local/cpanel/bin/set_hostname

As as last attempt I would remove the existing certs in /var/cpanel/ssl/cpanel retry.