I’m sure this is a typical scenario, but I can’t find the appropriate sequence of steps.
I have an existing www_dot_example_dot_com server at (say) 126.96.36.199 running Apache. I am building a new server at 188.8.131.52 using Caddy. For testing, I put 184.108.40.206 www.[details=Summary]This text will be hidden[/details]example.com in my local /etc/hosts. Once all is working, I will repoint the www_dot_example_dot_com DNS entry from 220.127.116.11 to 18.104.22.168.
The problem is I can’t start Caddy on 22.214.171.124 to serve www_dot_example_dot_com.
[wwwdotexampledotcom] failed to get certificate: acme: Error 403 - urn:acme:error:unauthorized - Invalid response from wwwdotexampledotcom/.well-known/acme-challenge/6Xc4_oq6r0de25CtrYIw59YeVHvUWQ9Ag6H3XbGx8y0:
which I assume is caused by the DNS entry for www_dot_example_dot_com pointing to 126.96.36.199, not 188.8.131.52
So how do I get certs and start Caddy so I can test www_dot_example_dot_com on 184.108.40.206 before updating the public DNS entry?