Skip to main content

SSL, Vhost creation and cPanel userdata

Comments

2 comments

  • alexis_
    Hello, To answer myself, if anyone has the same problem, it seems the datastore changed in V68 : 68 Release Notes - Version 68 Documentation - cPanel Documentation The VHOST changed too, now it's a "combined" file instead of two files :
    # V68 SSLCertificateFile /var/cpanel/ssl/apache_tls/DOMAIN.COM/combined # PRE-v68 SSLCertificateFile /var/cpanel/ssl/installed/certs/XXXXXXXXXXXX.crt SSLCertificateKeyFile /var/cpanel/ssl/installed/keys/XXXXXXXXXX.key
    Right now, the datastore is a mix of V1 (pre-68) files and V2 (post-68), to check this, you can use this command :
    # check "v2" file which are the one without the SSL* inside for f in /var/cpanel/userdata/*/*_SSL ; do if ! fgrep -q 'sslc' $f ; then echo $f ; fi ; done # for the "v1" for f in /var/cpanel/userdata/*/*_SSL ; do if fgrep -q 'sslc' $f ; then echo $f ; fi ; done
    It does not explain why apache crash randomly, some certificates seems messed up (empty key, empty cabundle etc...). I created a small script to check the SSL files, right now I don't know if this script is enough to check everything as I have not tested yet on a crashed server. It found some weird certificate files.
    #!/bin/bash for f in /var/cpanel/userdata/*/*_SSL ; do fgrep 'sslc' $f done | tr -s ' ' | cut -d ' ' -f 2 | while read i ; do ! test -f $i && echo "$i is missing" if echo "$i" | fgrep -q '.crt' ; then openssl x509 -in $i -text -noout > /dev/null || echo "$i is not a valid CRT" continue fi if echo "$i" | fgrep -q '.key' ; then openssl rsa -in $i -check -noout > /dev/null || echo "$i is not a valid KEY" continue fi if echo "$i" | fgrep -q '.cab' ; then openssl x509 -in $i -text -noout > /dev/null || echo "$i is not a valid CABUNDLE" continue fi done
    0
  • cPanelMichael
    It does not explain why apache crash randomly, some certificates seems messed up (empty key, empty cabundle etc...).

    Hello, Feel free to open a support ticket using the link in my signature so we can take a closer look at this. Thank you.
    0

Please sign in to leave a comment.