I tried to get a certificate using a docker in the local environment, but the error below occurred and it is not being processed.
IMPORTANT NOTES:
- The following errors were reported by the server:
2020-08-13T08:32:06.082318691Z
Domain: api.localhost.com
Type: dns
Detail: DNS problem: NXDOMAIN looking up TXT for
_acme-challenge.api.localhost.com - check that a DNS record
exists for this domain
I’m working on Windows 10 and the docker version is 19.
I checked the docking settings > network > dns server, but the dns settings did not work. Tell me the solution. Please.
Is that the actual base domain name of the system?
If so, then global DNS can't find the required TXT record to validate your request.
If not, then you need to understand how certificates work. You can't request a certificate for a domain that you don't own/control.
Do you own the domain “localhost.com” ?
If not, then you can’t request a certificate from that domain.
But to specifically answer your question: NO, there is nothing you can do in the local hosts file to overcome the lack of domain control.
The certificate validation is based on domain control (type DV).