在/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
將無法運作。