Skip to main content

finding the current install SSL from SSH

Comments

4 comments

  • cPanelMichael
    Hello @Neutrall, The
    0
  • cPanelMichael
    Hello @Neutrall, On a side note, in cPanel & WHM version 72 we're adding a Standardized Hook that triggers events before and after the installation or changes to SSL certificates via WHM's Install an SSL Certificate on a Domain interface or WHM API 1's installssl function. This is in addition to a separate Standardized Hook we're adding for AutoSSL certificate installations. Thank you.
    0
  • sparek-3
    I would probably recommend using whmapi1 for this, the fetch_ssl_vhosts API call. The UAPI interface isn't going to work if the account you are checking doesn't have the SSL feature enabled. Now, perhaps all of your accounts have this. But we don't typically allow this in our cPanels, we install certificate ourselves using the WHM (or the whmapi1 API). cPanel wants to move everything over to UAPI for better permission control, but it's not all that useful to me because the permission control become a burden. This is also why we will probably never see a "Park a domain" API call added to whmapi1, cPanel wants to control the permissions on that with UAPI (but that's getting off topic). When you run whmapi1 fetch_ssl_vhosts, look for the data->vhosts->crt->servername object. Then take that value (for each vhost installed certificate) and find the combined certificate information in /var/cpanel/ssl/apache_tls/%servername%/combined
    0
  • Daniel Berthiaume
    Thank you @cPanelMichael, This is giving me the proper value, now I just have to find the proper way to get all this information together so I can have it ready for Nginx proxy!. Thank you! Also, thanks @sparek-3 for the alternative, chances are that I might also take a look on your suggestion!
    0

Please sign in to leave a comment.