letsencrypt,nginx,aws和nodejs无法设置

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了letsencrypt,nginx,aws和nodejs无法设置相关的知识,希望对你有一定的参考价值。

我在aws EC2实例上使用nginx设置letsencrypt但是当我执行下面的命令时

sudo certbot --nginx -d dnestaging2.com -d www.dnestaging2.com

我低于输出

  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.

我不确定我在哪里制造错误以及如何使这项工作。它问我上面的问题,我回答他们,但是当它获得证书时,它会抛出错误。

任何解决方案赞赏

UPDATE

顺便说一句,我没有在上面的输出中注册任何域名。我将它们添加到53号公路,因为我正在使用它们。

答案

根据以下错误,必须注册域名,以便DNS可以找到它。

详细信息:DNS问题:NXDOMAIN查找A for dnestaging2.com

根据Registering Domain Names Using Amazon Route 53上的文档,域名必须在AWS Route 53上注册或从其他注册商转移。使用注册的域名。

以上是关于letsencrypt,nginx,aws和nodejs无法设置的主要内容,如果未能解决你的问题,请参考以下文章

nginx LetsEncrypt

AWS Elastic Beanstalk - NodeJS:在没有 Beanstalk 负载均衡器的情况下从 Letsencrypt 获取证书 SSL

sh 用于通过letsencrypt的docker镜像更新docker nginx代理中的letsencrypt证书的模板

LetsEncrypt - VirtualMin - Nginx:更改根文件夹

ubuntu nginx 安装 certbot(letsencrypt)

apache_conf Nginx配置letsencrypt + bitbucket