Error while running apachectl configtest.\n\nAH00526

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. |, so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: certbot --apache -d

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running apachectl configtest.

AH00526: Syntax error on line 16 of /etc/httpd/conf.d/hcilab-le-ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/' does not exist or is empty

The apache plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError("Error while running apachectl configtest.\n\nAH00526: Syntax error on line 16 of /etc/httpd/conf.d/hcilab-le-ssl.conf:\nSSLCertificateFile: file '/etc/letsencrypt/live/' does not exist or is empty\n",)
[root@bilmuh bilmuh]# systemctl restart httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

My web server is (include version): CENTOS 7

The path to the certificate doesn't match the host name you specified.


Thank you for your answer.
How can I completely delete letsencrypt and reinstall it

Why would you do that?

Did you perhaps delete the certificcate from Certbot by any chance?

1 Like

I deleted the letsencrypt folder from the file manager. so httpd doesn't work either.
the error it gives:
Jan 05 17:18:28 systemd[1]: Starting The Apache HTTP Server...
Jan 05 17:18:28 httpd[1195]: AH00112: Warning: DocumentRoot [/home/bilmuh/www/] does not exist
Jan 05 17:18:28 httpd[1195]: AH00526: Syntax error on line 16 of /etc/httpd/conf.d/hcilab-le-ssl.conf:
Jan 05 17:18:28 httpd[1195]: SSLCertificateFile: file '/etc/letsencrypt/live/' does not exist or is empty
Jan 05 17:18:28 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jan 05 17:18:28 systemd[1]: Failed to start The Apache HTTP Server.
Jan 05 17:18:28 systemd[1]: Unit httpd.service entered failed state.
Jan 05 17:18:28 systemd[1]: httpd.service failed.

Actually, there was an SSL certificate at Later, when I added certificates to subdomains, it got confused like this.
How can I completely delete letsencrypt and reinstall it.

You already removed the entire letsencrypt folder, why would you want to "entirely delete letsencrypt and reinstall it"?

It seems you don't fully grasp how Certbot works. Let me explain:

  • Certbot is a Python application originally developed by Let's Encrypt, but somewhere in 2016, development was transfered to the Electronic Frontier Foundation.
  • The Certbot program was once called "letsencrypt".
  • Due to the above, the data directory generated by Certbot is /etc/letsencrypt/.
  • But the Certbot program is located elsewhere.
  • Reinstalling Certbot does not magically bring back the /etc/letsencrypt/ directory.
  • Your Apache webserver is expecting the files from /etc/letsencrypt/.

There are three possible solution and deleting Certbot and reinstalling it is not one of them:

  • Temporarily disable the HTTPS configuration file for ' here:/etc/httpd/conf.d/hcilab-le-ssl.conf. If you didn't generate that configuration file yourself, but Certbot generated it based on your HTTP configuration *and* you didn't modify it manually, you could make a backup of the file and after the backup step delete it from /etc/httpd/conf.d/`. However, this would make your site HTTP only for the time until you generate your new certificate. Could be an issue if you have HTST configured.
  • Generate a self-signed certificate as "snake oil" and configure your HTTPS site so it temporarily uses this self-signed certificate. Afterwards, use Certbot to get a certificate and it should update the configuration file again.
  • Stop Apache and use the standalone plugin to get a new certificate. However, transition from the standalone plugin back to the apache plugin is not something I've done personally, so we should figure that out once your site is back up again.

Hopefully your current predicament has learned you not to delete directories without a backup if you don't know exactly what you're doing.


Now I have the information, thank you very much, I struggled a bit, this is the last situation:
[root@bilmuh bilmuh]# certbot --apache -d
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Starting new HTTPS connection (1):
Requesting a certificate for
Performing the following challenges:
http-01 challenge for
Error while running apachectl configtest.

AH00526: Syntax error on line 216 of /etc/httpd/conf.d/ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/' does not exist or is empty

Cleaning up challenges
Error while running apachectl configtest.

AH00526: Syntax error on line 216 of /etc/httpd/conf.d/ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/' does not exist or is empty

How can I fix this ?

Sorry, how do i do this?

You mean, nothing has changed?


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.