Failed to install Let’s Encrypt SSL certificate

SYSTEM INFORMATION
OS type and version Debian Linux 10
Webmin version 2.001
Virtualmin version 7.3-1

Hi, when I tried to install Let’s Encrypt SSL I have this error :

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for xxx.xxx.fr
http-01 challenge for www.xxx.xxx.fr
Using the webroot path /home/xxx/domains/xxx.xxx.fr/public_html for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. xxx.xxx.fr (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: x.x.x.x: Invalid response from http://xxx.xxx.fr/.well-known/acme-challenge/Yxx06u3kUMNVySHCSXK2l7gnV_YfSrYoUcFWZt-Uix8: 404, www.xxx.xxx.fr (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: xx.xxx.xx.xxx: Invalid response from http://www.xxx.xxx.fr/.well-known/acme-challenge/kx8RehU2bevnGHDuK4ABGdedrZJZmZ-ODV5Pa7xczw0: 404
IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: xxx.xxx-xxx.fr
   Type:   unauthorized
   Detail: xx.xxx.xx.xxx: Invalid response from
   http://xxx.xxx.fr/.well-known/acme-challenge/Yxx06u3kUMNVySHCSXK2l7gnV_YfSrYoUcFWZt-Uix8:
   404

   Domain: xxx.xxx-xxx.fr
   Type:   unauthorized
   Detail: xx.xxx.xx.xxx: Invalid response from
   http://xxx.xxx.fr//.well-known/acme-challenge/kx8RehU2bevnGHDuK4ABGdedrZJZmZ-ODV5Pa7xczw0:
   404

   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.

How to fix it please ?

Regards,
Laurent

Use https://mxtoolbox.com/ to check your dns is setup correctly.

if dns look ok, 404 response could also mean your .well-known dir is not properly configured in apache virtual-host.

Hello thank you for your answers,
I changed my documents_root: public_html to public_html/htdocs
When I restore to public_html let’encrypt works properly. How do I get let’encrypt to work under the new name of my root document?

Good day i hope everyone is doing Marvelous, i’m also experiencing same problem here is error i get, yyy. will serve as my domain name

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Renewing an existing certificate for yyy. and *.yyy.
Performing the following challenges:
dns-01 challenge for yyy
dns-01 challenge for yyy
Running manual-auth-hook command: /etc/webmin/webmin/letsencrypt-dns.pl
manual-auth-hook command “/etc/webmin/webmin/letsencrypt-dns.pl” returned error code 1
Error output from manual-auth-hook command letsencrypt-dns.pl:
Error: Missing file to read at virtual_server::/usr/libexec/webmin/virtual-server/feature-dns.pl line 3484
Error

Missing file to read at virtual_server::/usr/libexec/webmin/virtual-server/feature-dns.pl line 3484

Running manual-auth-hook command: /etc/webmin/webmin/letsencrypt-dns.pl
manual-auth-hook command “/etc/webmin/webmin/letsencrypt-dns.pl” returned error code 1
Error output from manual-auth-hook command letsencrypt-dns.pl:
Error: Missing file to read at virtual_server::/usr/libexec/webmin/virtual-server/feature-dns.pl line 3484
Error

Missing file to read at virtual_server::/usr/libexec/webmin/virtual-server/feature-dns.pl line 3484

Waiting for verification…
Challenge failed for domain yyy.
Challenge failed for domain yyy.
dns-01 challenge for /yyy.
dns-01 challenge for yyy.
Cleaning up challenges
Running manual-cleanup-hook command: /etc/webmin/webmin/letsencrypt-cleanup.pl
Running manual-cleanup-hook command: /etc/webmin/webmin/letsencrypt-cleanup.pl
Some challenges have failed.
IMPORTANT NOTES:

  • The following errors were reported by the server:

    Domain: yyy.
    Type: dns
    Detail: DNS problem: NXDOMAIN looking up TXT for
    _acme-challenge.yyy.com - check that a DNS record exists
    for this domain

    Domain: yyy.
    Type: dns
    Detail: DNS problem: NXDOMAIN looking up TXT for
    _acme-challenge.yyy. - check that a DNS record exists
    for this domain

@ laurentlt when i do rename or change my documents_root: public_html to public_html/htdocs
i get error again which says

can not rename the file, these might happen because source file has been removed or due to restrictions

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