0

I had setup the server, virtual hosts via cpanel. I didnt renew my cpanel subscription because I no longer needed it.

Now my SSL certificate has expired. I have SSH access to the server.

How do I update the certificate without subscribing to cpanel just to renew the certificate?

What I have tried:

  1. Replace the keys and certs in the user's home directory.

  2. update using whmapi1, but that says cannot read license.

0

If someone has a better answer, please post it. But here's how I was able to achieve it:

  1. Goto /var/cpanel/ssl/apache_tls/

  2. You will see a directory for each of your virtual host.

  3. Inside each directory, there is a certificates file and a combined file. There are also .cache files for both.

  4. Edit the certificate file, and put your certificate in place of the expired ones.

  5. Edit the combined file, and put your key and certificate in place of the expired ones.

  6. Rebuild the ssl.db for all users using /scripts/rebuildinstalledssldb

  7. Delete the .cache files (not sure if necessary)

  8. Restart apache2 using systemctl restart httpd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.