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

LetsEncrypt + Certbot

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 1,514 times, 1 visits today)

If you found this post useful ...

Buy Me a Coffee logo
Wondering why you keep seeing lower-cased 'i' in my posts? Read -> Why ‘i’ is not capitalized
0 0 votes
Article Rating
Subscribe
Notify of
guest

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Kyu
Kyu
5 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
5 years ago

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

2
0
Would love your thoughts, please comment.x
()
x