Let’s Encrypt é uma autoridade certificadora, automatizada e aberta, mantida pela organização sem fins lucrativos Internet Security Research Group (ISRG), possibilitando a criação de certificados SSL gratuitos para aumento da segurança de sites na Internet.

Várias pessoas utilizam o Let’s Encrypt para gerar seus certificados SSL, pois são certificados confiáveis e que a autoridade certificadora está contida na maioria dos browsers.

Porém nesta última versão, ao executar o comando abaixo, para a atualização do certificado anteriormente gerado, me deparei com o seguinte erro:

# ./letsencrypt-auto renew

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.domain.com
nginx: [warn] conflicting server name “www.domain.com” on 0.0.0.0:80, ignored
Waiting for verification…
Challenge failed for domain www.domain.com
http-01 challenge for www.domain.com
Cleaning up challenges
Some challenges have failed.

IMPORTANT NOTES:

– The following errors were reported by the server:

Domain: www.domain.com
Type: unauthorized
Detail: Invalid response from
http://www.domain.com/.well-known/acme-challenge/iRjtHn7paoM0kICbXXXXjiiTMs1uYcjkF7HgftNwvnw
[XXX.XXX.XXX.XXX]: “\r\n404 Not Found\r\n\r\n404 Not Found\r\n” To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.

Para resolver este problema execute o seguinte comando:

# ./certbot-auto run -a webroot -i nginx -w /var/www/html -d www.domain.com

Desta forma o seu certificado será renovado automaticamente.