Knowledge Base

Browse our knowledge base for free solutions to common problems

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

Created On: 23 February 2023
Written by: Ben

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.

ICTU LTD is a company registered England and Wales (Company No. 09344913) 15 Queen Square, Leeds, West Yorkshire, England, LS2 8AJ
Copyright © 2024 ICTU LTD, All Rights Reserved.
exit