简体   繁体   English

letsencrypt,nginx,aws和nodejs无法设置

[英]letsencrypt, nginx, aws and nodejs can't setup

I am setting up letsencrypt with nginx on aws EC2 instance however when I execute below command 我在AWS EC2实例上使用Nginx设置letencrypt,但是当我执行以下命令时

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. 出于这个原因,我将它们添加到aws Route 53中。

Based on the error below, the domain name has to be registered so that DNS can find it. 根据以下错误,必须注册域名,以便DNS可以找到它。

Detail: DNS problem: NXDOMAIN looking up A for dnestaging2.com 详细信息:DNS问题:NXDOMAIN在dnestaging2.com上查找A

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. 根据有关使用Amazon Route 53注册域名的文档,该域必须在AWS Route 53上注册或从另一个注册商转移。 Use a registered domain name. 使用注册的域名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM