EC2 elastic IP address not valid

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:

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.net

    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. 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\n

    404
    Not Found

    \r\n

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;
    }

}

improve-code.net doesn’t have any IP addresses.

www.improve-code.net has one IP, 35.181.29.4, and it’s valid.

You need to add an A record for improve-code.net in Route 53 too.

That aside, do you still have the full output of “sudo certbot --nginx -d improve-code.net -d www.improve-code.net”?

1 Like

OK, thank you, I’ll try to add improve-code.net to Route53.

Yes, here is the output of “ sudo certbot --nginx -d improve-code.net -d www.improve-code.net ”:

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 improve-code.net
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. improve-code.net (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: unknownHost :: No valid IP addresses found for improve-code.net

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.net

    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. 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.

I added improve-code.net to Route53 and now it’s working all fine !
Thank you so much !

1 Like

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