I can't understand how to verify my domain for letsencrypt.
$ ./letsencrypt-auto certonly -a webroot --webroot-path=/home/my_user1/my_domain -d my_domain.com -d www.my_domain.com
Requesting root privileges to run certbot...
/home/my_user1/.local/share/letsencrypt/bin/letsencrypt certonly -a webroot --webroot-path=/home/my_user1/my_domain -d my_domain.com -d www.my_domain.com
Failed authorization procedure. my_domain.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://my_domain.com/.well-known/acme-challenge/aaa: "<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>", www.my_domain.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.my_domain.com/.well-known/acme-challenge/bbbb: "<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: my_domain.com
Type: unauthorized
Detail: Invalid response from
http://my_domain.com/.well-known/acme-challenge/aaaaa:
"<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
Domain: www.my_domain.com
Type: unauthorized
Detail: Invalid response from
http://www.my_domain.com/.well-known/acme-challenge/bbbb:
"<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address.
After that I create those 2 files in acte-challenge directory, re-run the script and but this time it requests 2 different ones. That is, it's always step ahead and can't know what files it'll generate next time.
What should I do about that?
Best Answer
The error message
and the $ in
$ ./letsencrypt-auto
seem to indicate that you're trying to run letsencrypt as an unprivileged user.Cert-bot is slightly more forgiving, but will need additional parameters when you don't run it as root: