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.

How to Access Web Disk in cPanel?

The web disk account allows you to easily navigate, upload and download files between the…

What to do When the Connection to an Agent Fails in R1Soft Backup?

If your connection to an agent fails, the following are the steps that you need…

WHM -litespeed and Apache

How to switch between LiteSpeed and Apache in WHM

In this tutorial, we’ll explain how to switch between Lite Speed and Apache in WHM.…