Error code AH00526 when create new certificate after rename and deleted old certificate files

Hi everyone ...

I need help solving this error AH00526.,
i am using linux ubuntu server with apache webserver.,
At first I wanted to try to create a new certificate for a new domain, then I thought about editing the old certificate file., but after running this command to generate a new one:

"certbot -d -d"

then i got this problem :

"Saving debug logs to /var/log/letsencrypt/letsencrypt.log
Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.
AH00526: Syntax error on line 19 of /etc/apache2/sites-enabled/
SSLCertificateFile: file '/etc/letsencrypt/live/' does not exist or is empty"

"Certbot doesn't know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run "certbot certonly" to do so. You'll need to manually configure your web server to use the resulting certificate."

and I'm now stuck in this section every time I want to generate a new certificate., it always fails and this message appears.
if I restart apache with the certificate that was created, apache fails to restart, so I need to first delete the files in the "sites-enable" directory and then restart successfully.

but because I didn't really understand at first, I deleted the old certificate file that was edited earlier.

and now stuck at AH00526 every time I try to create a new certificate.

what needs to be done to overcome this?
really need help .
thanks everybody ...

Hi @ChanT, and welcome to the LE community forum :slight_smile:

Let's see what mischief Apache has created with the output of:
apachectl -t -D DUMP_VHOSTS

and the output of:
certbot certificates


Do this again:



This shows the same name twice:


Shows that HTTP and HTTPS server blocks are in the same file.
When you say:

What file(s) did you delete?


Is NOT covered by:


I can't see what is being changed.
The hiding of the domain names is not very helpful.


looks like you'll need to manually edit /etc/apache2/sites-enabled/ and comment out (or remove ) the reference to the certificate...
Restart apache successfully and then get the cert for the correct domain.


Step #1 Rename certificate file
Step #2 regenerate sites-enabled link
Step #3 certbot ...
Apache immediately fails with file doesn't exist or is empty.

It seems that Steps #1 and #2 are NOT doing what you expect.


Hello ...,

hmmm ok I will try.,,
I'll become back ...

Is it true that the previous certificate file should not be changed or renamed, let alone deleted??
the impact., I can't create & generate a new certificate., stuck on this AH526..

That should NOT have ".conf" at the end.


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