Missing /etc/letsencrypt/live/ folder

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. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: osprey2.dev.aws.auscert.org.au

I ran this command:
sudo certbot --apache

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running apache2ctl configtest.
Action 'configtest' failed.
The Apache error log may have more information.

[Wed Apr 03 20:58:06.214181 2024] [so:warn] [pid 13262:tid 140421046447168] AH01574: module wsgi_module is already loaded, skipping
AH00526: Syntax error on line 34 of /etc/apache2/sites-enabled/osprey.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/osprey2.dev.aws.auscert.org.au/fullchain.pem' 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 apache2ctl configtest.\nAction 'configtest' failed.\nThe Apache error log may have more information.\n\n[Wed Apr 03 20:58:06.214181 2024] [so:warn] [pid 13262:tid 140421046447168] AH01574: module wsgi_module is already loaded, skipping\nAH00526: Syntax error on line 34 of /etc/apache2/sites-enabled/osprey.conf:\nSSLCertificateFile: file '/etc/letsencrypt/live/osprey2.dev.aws.auscert.org.au/fullchain.pem' does not exist or is empty\n")

My web server is (include version):
Apache

The operating system my web server runs on is (include version):
Ubuntu 20.04

My hosting provider, if applicable, is:
AWS

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 0.40.0

Commnets:
I found that there is no /etc/letsencrypt/live/ folder.

Welcome to the community @francesd919

Did you create the Apache VirtualHost by hand before getting the certificate?

Because Apache is failing as it was configured to use a certificate file that does not exist. Certbot would not update your Apache config until after getting a cert.

Two things. First, you should update Certbot from the very old 0.40 and use the snap version. Ubuntu readily supports the snap install. See https://certbot.eff.org for instructions. Follow them closely

Second, show output of this

sudo certbot certificates
3 Likes

Thank you for the prompt reply MikeMcQ.

The VritualHost config was created by part of the Ansible playbook using the template module.

  • name: Add apache virtualhost config
    template:
    src: virtualhost.j2
    dest: "{{ apache_dir }}/osprey.conf"
    owner: root
    group: root
    mode: 0660
    notify: restart apache

Following your instruction, I have just updated certbot to "certbot 2.9.0".

certbot certificates output:

Thank you for your help.

1 Like

image

I think there was some mistake in the playbook -
We used to be our own CA, and later transitioned to use Let's Encrypt and the playbook was only partially upated.

Thank you for the prompt reply anyway.

I think this can be closed. :slight_smile:

3 Likes

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