Categories
CLI Security Server Configuration Web Development

Apache + LetsEncrypt file ‘/etc/letsencrypt/live/…/fullchain.pem’ does not exist or is empty. Action ‘configtest’ failed.

I had setup a new Apache server and needed an SSL certificate so i went with the tried and true, quick and easy LetsEncrypt/certbot route.

While testing if gzip was installed, i received errors running apachectl configtest. First time receiving this error. It seemed to be caused by the LetsEncrypt install. I probably wouldn’t have noticed it for quite some time since the https:// version of the site i just put up on the new Apache server was working.

AH00526: Syntax error on line 27 of /etc/apache2/sites-enabled/domain-name-here.com-le-ssl.conf:
SSLCertificateFile: file '/etc/letsencrypt/live/domain-name-here.com/fullchain.pem' does not exist or is empty

I scoured the usual sites for server config issues like DigitalOcean and StackOverflow, but nothing suggested worked. I ended up finding some comment looking at it from a permissions issue. Smart thinking since that was a part of what i was running into as you can see from the screenshot below.

Certbot fullchain.pem permissions issue

I ended up changing the permissions on the /etc/letsencrypt/live directory and the configtest command passed. No more error. Boom. Fixed!

Use this sudo chmod 755 /etc/letsencrypt/live.

(Visited 78 times, 1 visits today)
0 0 votes
Article Rating
Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Kyu
Kyu
2 years ago

Thanks, i’ve beeen fighting with this issues for 2 days and now it’s finally working as it should.
I’d just like to add something though. in my case, it was still giving off the error after chmodding the live folder. By then of course i know it was a permission issue but i didn’t know as to where the issue lide after that stem.

After a bit of digging i noticed the live folder was a link to archive. so in the end i had to run these two commands for the issue to go away:

sudo chmod 755 /etc/letsencrypt/live
sudo chmod 755 /etc/letsencrypt/archive

And it was fixed. well that was a hectic weekend ^^

narmo
narmo
Reply to  Kyu
2 years ago

Thanks for pointing out that it’s a link to archive, i wouldn’t have thought of that. Saved my day ^^