How can we help you today?

Error while running apachectl configtest. AH00526: Syntax error on line 85 of /etc/httpd/conf.d/ssl.conf

Issue

You have probably been greeted with the following error while trying to generate an SSL certificate with LetsEncrypt and thats why you are looking at this article:

[root@server conf.d]# certbot --apache
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running apachectl configtest.

AH00526: Syntax error on line 85 of /etc/httpd/conf.d/ssl.conf:
SSLCertificateFile: file '/etc/pki/tls/certs/localhost.crt' does not exist or is empty

Solution

The good news is that this is normally nothing to worry about. The easiest way to cure the issue is to run the following command:

/usr/libexec/httpd-ssl-gencerts

Then restarting httpd with the following:

systemctl restart httpd

The issue should not return after the series of commands are completed.

Leave a Reply

Your email address will not be published. Required fields are marked *

    ICTU LTD is a company registered England and Wales (Company No. 09344913) 142 Thornes Lane, Wakefield, England, WF2 7RE
    Copyright © 2025 ICTU LTD, All Rights Reserved.