certbot(Let's Encrypt)为本地域 NXDOMAIN 查找 **.domain 的 A

certbot(Let's Encrypt)为本地域 NXDOMAIN 查找 **.domain 的 A

我正在尝试使用certbot让我们加密) 为本地域。

/etc/hosts我有这个。

127.0.0.1       myapp.whitebear.com

但是当我运行certbot(Let's Encrypt)时显示此错误。

如何为本地主机设置 HTTPS?

Obtaining a new certificate
Performing the following challenges:
http-01 challenge for myapp.whitebear.com
Waiting for verification...
Challenge failed for domain myapp.whitebear.com
http-01 challenge for myapp.whitebear.com
Cleaning up challenges
Some challenges have failed.

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

   Domain: myapp.whitebear.com
   Type:   dns
   Detail: DNS problem: NXDOMAIN looking up A for myapp.whitebear.com

答案1

要使用 Let's Encrypt 证书,您的域名必须存在于 DNS 系统中。诸如此类的本地覆盖/etc/hosts将不起作用。

相关内容