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.
I’ve tried “sudo” also, but it didn’t help.
What should I do about that? Or what’s an easier way to set it up? I’ve done it before I don’t remember how exactly because it’s changing over time.