In this tutorial, we’ll explain how Apache fails to start due to:

When Apache is not running and you see the following error is logged to the Apache error log. (/etc/apache2/logs/error_log) when Apache fails to start:

[ssl:emerg] [pid 2229] AH02312: Fatal error initialising mod_ssl, exiting.
[ssl:emerg] [pid 2229] AH02564: Failed to configure encrypted (?) private key
domain.tld:443:1, check /etc/pki/tls/certs/hostname.domain.tld.crt
AH00016: Configuration Failed

Description: This happens while using the SSLCertificateFile directive with an invalid path in a custom Apache that includes a configuration file.

Example:

# cat /etc/apache2/conf.d/userdata/ssl/2_4/cpaneluser/domain.tld/includefile.conf
SSLCertificateFile /etc/pki/tls/certs/hostname.domain.tld.crt

Workaround: As default, Apache’s configuration contains an SSLCertificateFile directive for each domain. If you want to confirm then run the following command:

# grep 'SSLCertificateFile' /etc/apache2/conf/httpd.conf

To resolve this kind of issue, remove the SSLCertificateFile directive from the custom. Apache which includes a configuration file, or comment out the directive by adding a ‘#’ to the front of the line the directive is on. Once it is completed, run the following scripts to load the change and to start Apache: 

/scripts/rebuildhttpdconf
/scripts/restartsrv_httpd

For more help with your hosting, visit our bodHOST Knowledgebase.

Share:

Popular Posts You May Read

Explore more hosting insights, tips and industry updates.

Fatal error: Undefined class name ’string’ in /usr

Fatal error: Undefined class name ’string’ in /usr/local/cpanel/base/horde/turba/lib/Turba.php on line 168. This error caused by…

FAQs – Email Services on Shared and Reseller Web Hosting

Q: How many email accounts can I set up under a single Shared or Reseller…

Cloud Hosting for PHP and MySQL Web Developers

Cloud Hosting PHP Bodhost offers several different levels of cloud hosting to meet the varying…