Skip to main content

How to export SSL from cPanel with .pfx

Comments

4 comments

  • cPanelMichael
    Hello @webdsn, Certificates are not stored as .crt or .key files in cPanel & WHM. You can find the combined key and certificate in the following file: /var/cpanel/ssl/apache_tls/domain.tld/combined
    Replace "domain.tld" with the domain name of the certificate and key you want to obtain. You can then manually copy the certificate and key text into individual .crt and .key files in order to run that command. Thank you.
    0
  • webdsn
    Hello @webdsn, Certificates are not stored as .crt or .key files in cPanel & WHM. You can find the combined key and certificate in the following file: /var/cpanel/ssl/apache_tls/domain.tld/combined
    Replace "domain.tld" with the domain name of the certificate and key you want to obtain. You can then manually copy the certificate and key text into individual .crt and .key files in order to run that command. Thank you.

    Thanks your reply I already found that file But I saw several sets of encoded content in this file one start by BEGIN RSA PRIVATE KEY and three start by BEGIN CERTIFICATE I don't know which part is .key or .crt file In addition, I searched for some teaching articles to use this command to generate PFX files. Is this directive wrong or not applicable? [QUOTE] openssl pkcs12 -export -out /backup/domain_name.pfx -inkey /etc/ssl/private/domain_name.key -in /etc/ssl/certs/domain_name.crt
    0
  • cPanelMichael
    But I saw several sets of encoded content in this file one start by BEGIN RSA PRIVATE KEY and three start by BEGIN CERTIFICATE I don't know which part is .key or .crt file

    Hello @webdsn, The following content is for the .key file: -----BEGIN RSA PRIVATE KEY----- CONTENTHERE -----END RSA PRIVATE KEY-----
    The following content is for the .crt file: -----BEGIN CERTIFICATE----- CONTENTHERE -----END CERTIFICATE-----
    In addition, I searched for some teaching articles to use this command to generate PFX files. Is this directive wrong or not applicable?

    That command should work as long as you manually separate out the data from the combined file into individual .key and .crt files. Thank you.
    0
  • webdsn
    Hello @webdsn, The following content is for the .key file: -----BEGIN RSA PRIVATE KEY----- CONTENTHERE -----END RSA PRIVATE KEY-----
    The following content is for the .crt file: -----BEGIN CERTIFICATE----- CONTENTHERE -----END CERTIFICATE-----
    That command should work as long as you manually separate out the data from the combined file into individual .key and .crt files. Thank you.

    Thanks your reply I will try this~
    0

Please sign in to leave a comment.