andreaswolf / ansible-role-letsencrypt

Ansible role for generating certificates with acme-tiny via Let’s encrypt
46 stars 20 forks source link

Cannot validate via well-known #37

Open salsadigitalau opened 7 years ago

salsadigitalau commented 7 years ago

When running role, I get the following error

ValueError: Wrote file to /var/www/html/docroot/letse/7NO9jVHwHKxry7PUqoNxpMx-V40Mksi_inZl14dV3Ao, but couldn't download http://website.com.well-known/acme-challenge/7NO9jVHwHKxry7PUqoNxpMx-V40Mksi_inZl14dV3Ao

Upon review, the folder docroot/letse is empty.

The permissions are set as 755 and ownership as the letsencrypt user. I can't track if it cannot write to the file and why.

The Nginx path alias is set, but it won't work unless there is a file.

andreaswolf commented 7 years ago

That is really weird. I had a similar case a few times, but that was usually due to a wrong alias configuration in the webserver.

Can you check where your ".well-known/acme-challenge" points to? Probably just put a small test file in there and try fetching it from the server.

runofthemill commented 7 years ago

I just had the same issue; I'm using the role as part of Trellis.

@salsadigitalau - I did some digging and this solved for me. I think it might be due to my server configured for IPV6 but can't confirm.