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

本域 NXDOMAIN 的 certbot (Let's Encrypt) 尋找 **.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將無法運作。

相關內容