Apache plugin broken

My domain is: folk.lv

I ran this command:

  1. I could not renew my certificate because of a problem with a domain name (amanda.folk.lv).
  2. I wanted to start fresh and deleted the certificate.
  3. Now I am stuck because I Apache is broken. Running apache2ctrl configtest produces the following output:

AH00526: Syntax error on line 33 of /etc/apache2/sites-enabled/amanda.zaeska.lv-le-ssl.conf:
SSLCertificateFile: file ‘/etc/letsencrypt/live/folk.lv/fullchain.pem’ does not exist or is empty
Action ‘configtest’ failed.
The Apache error log may have more information.

  1. I tried fixing this issue by a2dissite amanda.folk.lv.conf and amanda.folk.lv.conf and amanda.folk.lv-le-ssl.conf
  2. I also deleted the corresponding files in /etc/apache2/sites-available and /etc/apache2-sites-enabled

But the problem persists.

I run: Debian 9 on Digitalocean and I can login to a root shell.

The version of my client is certbot 0.30.0

Thanks for helping!
Toms

If you have ended up with an Apache configuration that references non-existent certificates, one way to get it online again may be to temporarily use snakeoil (self-signed) certificates.

On Debian, you can achieve this with:

apt -y install ssl-cert
make-ssl-cert generate-default-snakeoil

You can then update your Apache configuration in the respective locations (where the non-existent files are referenced) with:

SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

Once Apache is able to start up again, you can try use Certbot again.

If you can't get the snake-oil to grease the wheels, try removing the offending file:

Perfect, this solution worked like a charm and I am up and running again.

Thanks!

1 Like

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