How to reset certificate or change hostname from shell

speckados

Well-Known Member
I've use a templates for create my new VPS (KVM)

But now has a problem, because on template server certificate (Free) it's outdated.

My config it's secure, and when try access, send to hostname (hostname it's name of template and not actual name)

On this point, I can't access to WHM

I like reset hostname and recreate SSL certificate or not force to move access to hostname for access to WHM interface and change hostname.

Apreciate help.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,256
463
Hello,

The set_hostname utility will allow you to make the change via the command line:

The set_hostname Utility - Documentation - cPanel Documentation

Per this document:

When you run this command, the set_hostname utility performs the following actions:
  • It updates the hostname in the /etc/sysconfig/network file, and in the kernel.
  • It updates the server's Apache configuration.
  • It updates the cPanel license.
  • It updates cPHulk.
  • It restarts MySQL®.
  • It rebuilds cPanel & WHM's global cache.
  • It updates the FTP, Exim, Dovecot, and cPanel SSL certificates.
More information on the free hostname SSL certificate is available at:

Free cPanel-Signed Hostname Certificate - cPanel Knowledge Base - cPanel Documentation

Thank you.