Juan I. Morales Pestana
Juan I. Morales Pestana

Reputation: 1147

unable to config certbot with nginx to accept https

When I tried to configure my nginx app with certboot following this tutorial and others like. I allways step with the same amswer from certbot

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 sicocme.enterpriserealdomain.com http-01 challenge for www.sicocme.enterpriserealdomain.com Waiting for verification... Cleaning up challenges Failed authorization procedure. sicocme.enterpriserealdomain.com (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: dns :: DNS problem: NXDOMAIN looking up A for sicocme.enterpriserealdomain.com, www.sicocme.enterpriserealdomain.com (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: dns :: DNS problem: NXDOMAIN looking up A for www.sicocme.enterpriserealdomain.com

IMPORTANT NOTES: - The following errors were reported by the server:

Domain: sicocme.enterpriserealdomain.com Type: connection
Detail: dns :: DNS problem: NXDOMAIN looking up A for
sicocme.enterpriserealdomain.com

Domain: www.sicocme.enterpriserealdomain.com Type: connection Detail: dns :: DNS problem: NXDOMAIN looking up A for
www.sicocme.enterpriserealdomain.com

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.

When I check my domain server the A record is there for both www and no-www with the correct IP address. The server has access to network and can access or be accessed by IP or domain name which proves that the DNS domain recognizes this machine and exists

Also I make shure to allow the proper ports with ufw

To                         Action      From
--                         ------      ----
443/tcp                    ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
22/tcp                     ALLOW       Anywhere
5432/tcp                   ALLOW       Anywhere
Nginx Full                 ALLOW       Anywhere
443/tcp (v6)               ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
22/tcp (v6)                ALLOW       Anywhere (v6)
5432/tcp (v6)              ALLOW       Anywhere (v6)
Nginx Full (v6)            ALLOW       Anywhere (v6)

Why could this be happening? Thanks in advance!

Upvotes: 0

Views: 3052

Answers (3)

Mafei
Mafei

Reputation: 3801

You should add a new DNS record for www.yourdomain.com (for www).

I think you have added only DNS record for '@' please check this: enter image description here

Upvotes: 0

Thilina Dharmasena
Thilina Dharmasena

Reputation: 2341

This is the same issue but with the Apache enter image description here

check the A record has set with the server then

 sudo certbot --apache -d DOMAIN_WOTHOUT_WWW -d DOMAIN_WITH_WWW

Then it will work fine.

Upvotes: 1

mdeora
mdeora

Reputation: 4534

The problem is that your DNS records are not propagated yet. See below url - https://dnsmap.io/#A/sicocme.enterpriserealdomain.com

Make sure your DNS records are propagated all over than things should be fine.

Upvotes: 0

Related Questions