I am setting up letsencrypt with nginx on aws EC2 instance however when I execute below command
sudo certbot --nginx -d dnestaging2.com -d www.dnestaging2.com
I get below output
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): email@email.com
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
-------------------------------------------------------------------------------
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server at
https://acme-v01.api.letsencrypt.org/directory
-------------------------------------------------------------------------------
(A)gree/(C)ancel: A
-------------------------------------------------------------------------------
Would you be willing to share your email address with the Electronic Frontier
Foundation, a founding partner of the Let's Encrypt project and the non-profit
organization that develops Certbot? We'd like to send you email about EFF and
our work to encrypt the web, protect its users and defend digital rights.
-------------------------------------------------------------------------------
(Y)es/(N)o: N
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for dnestaging2.com
http-01 challenge for www.dnestaging2.com
Using default address 80 for authentication.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. dnestaging2.com (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: DNS problem: NXDOMAIN looking up A for dnestaging2.com, www.dnestaging2.com (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: DNS problem: NXDOMAIN looking up A for www.dnestaging2.com
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: dnestaging2.com
Type: connection
Detail: DNS problem: NXDOMAIN looking up A for dnestaging2.com
Domain: www.dnestaging2.com
Type: connection
Detail: DNS problem: NXDOMAIN looking up A for www.dnestaging2.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.
- Your account credentials have been saved in your Certbot
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
I am not sure where am I making things wrong and how to make this work. It asks me above questions and I respond to them but when it obtains certificates then it throws above errors.
Any solution appreciated.
UPDATE
BTW I dont have any domain name registered in above outputs. I added them to aws Route 53 for that reason I am using them.
Based on the error below, the domain name has to be registered so that DNS can find it.
Detail: DNS problem: NXDOMAIN looking up A for dnestaging2.com
Based on the documentation on Registering Domain Names Using Amazon Route 53 the domain has to be registered on AWS Route 53 or transferred from another registrar. Use a registered domain name.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.