I used your example from the docs which works with a real domain nicely:
But how can I run this in my local machine?
I edited /etc/hosts
127.0.0.1 localhost
127.0.0.1 whoami.example.com
And started both container and get this error of course:
caddy-1 | {"level":"info","ts":1717584209.3414166,"logger":"http","msg":"using ACME account","account_id":"https://acme-v02.api.letsencrypt.org/acme/acct/1706364667","account_contact":[]}
caddy-1 | {"level":"error","ts":1717584212.0552607,"logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"whoami.example.com","issuer":"acme-v02.api.letsencrypt.org-directory","error":"HTTP 400 urn:ietf:params:acme:error:rejectedIdentifier - Error creating new order :: Cannot issue for \"whoami.example.com\": The ACME server refuses to issue a certificate for this domain name, because it is forbidden by policy"}
caddy-1 | {"level":"error","ts":1717584212.0553057,"logger":"tls.obtain","msg":"will retry","error":"[whoami.example.com] Obtain: [whoami.example.com] creating new order: attempt 1: https://acme-v02.api.letsencrypt.org/acme/new-order: HTTP 400 urn:ietf:params:acme:error:rejectedIdentifier - Error creating new order :: Cannot issue for \"whoami.example.com\": The ACME server refuses to issue a certificate for this domain name, because it is forbidden by policy (ca=https://acme-v02.api.letsencrypt.org/directory)","attempt":1,"retrying_in":60,"elapsed":2.714485807,"max_duration":2592000}
If I ignore this error and try to connect to whoami then i get this error:
Hi,
I want to do some testing on my local machine.
I used your example from the docs which works with a real domain nicely:
But how can I run this in my local machine?
I edited /etc/hosts
And started both container and get this error of course:
If I ignore this error and try to connect to whoami then i get this error:
What can I do to test local?