Symptoms
-
Apache fails to restart with the following error:
CONFIG_TEXT: Starting httpd: AH00526: Syntax error on line 21355 of /etc/apache2/conf/httpd.conf: SSLCertificateFile: file '/var/cpanel/ssl/cpanel/mycpanel.pem' does not exist or is empty [FAILED]
Cause
The /var/cpanel/ssl/cpanel/mycpanel.pem file, which holds the key, certificate, and CA bundle for the hostname certificate, is missing, empty, or corrupt. Removing it leaves the hostname with a self-signed certificate (cpanel.pem).
Resolution
- Log into the server via SSH as the root user.
-
Check whether the file is missing, empty, or corrupt:
# ls -l /var/cpanel/ssl/cpanel/
-
If the file exists but is corrupt, move it to a backup:
# mv -v /var/cpanel/ssl/cpanel/mycpanel.pem{,.$( date +%Y%m%d )}
-
Regenerate the hostname certificate files:
# /usr/local/cpanel/bin/checkallsslcerts
-
Rebuild the Apache configuration and restart the Apache service:
# /scripts/rebuildhttpdconf
# /scripts/restartsrv_httpd -
Verify that the
mycpanel.pemfile exists again and is not empty:# ls -l /var/cpanel/ssl/cpanel/mycpanel.pem
Comments
0 comments
Article is closed for comments.