Hi, I have an ec2 instance with aws and I set an elastic ip to it. My domain name is from Route53, I don’t know if it matters or not. My problem is, my IP address seems to be not valid, and I don’t know why. Couldn’t find an answer on the web.
Below is my nginx domain config file
My domain is: improve-code.net
I ran this command:
- The first try: sudo certbot --nginx -d improve-code.net -d www.improve-code.net
- The second try: sudo ./certbot-auto --debug -v --server https://acme-v01.api.letsencrypt.org/directory certonly --webroot -w /var/www/html -d improve-code.net -d www.improve-code.net
It produced this output:
IMPORTANT NOTES:
-
The following errors were reported by the server:
Domain: improve-code.net
Type: connection
Detail: unknownHost :: No valid IP addresses found for
improve-code.netTo 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. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you’re using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided. -
The following errors were reported by the server:
Domain: www.improve-code.net
Type: unauthorized
Detail: Invalid response from
http://www.improve-code.net/.well-known/acme-challenge/L_3z4hOtWXo4h8IEZDMAwdhdOEd_9jxj6rRCH3ewZCA
[35.181.29.4]: “\r\n404 Not
Found\r\n<body bgcolor=“white”>\r\n404
\r\n
Not Found
”
My web server is (include version):
The operating system my web server runs on is (include version): Ubuntu 18.04
My hosting provider, if applicable, is: Amazon Web Service
I can login to a root shell on my machine (yes or no, or I don’t know): yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.31.0
Nginx domain config file:
server {
listen 80;
listen [::]:80;
root /var/www/improve-code.net/html;
index index.html index.htm index.nginx-debian.html;
server_name improve-code.net www.improve-code.net;
location / {
try_files $uri $uri/ =404;
}
}