root@abcd:~/ravkumar/caddy# ./caddy -conf caddyfile.conf
Activating privacy features…2017/09/05 20:42:33 [https] failed to get certificate: acme: Error 400 - urn:acme:error:malformed - Error creating new authz :: DNS name does not have enough labels
Looking to resolve this. Could not find enough information about it.
acme: Error 400 - urn:acme:error:malformed - Error creating new authz :: DNS name does not have enough labels
A label is one section of a domain name. www.example.com has three - www, example, and com. The minimum number of labels for a publicly addressable domain name is 2 (e.g. example.com).
If you haven’t made a mistake while typing https://helloworld.com:2085 in your Caddyfile, there could be an issue with Caddy.
I’m guessing there’s a space between https and ://helloworld.... in the Caddyfile, that’s causing it to be parsed that way, since the Caddyfile posted above should work.
Thanks for the help. There was a missing ‘/’ in https:// ( my apologies for making everyone take a look at that silly error)
Now that is fixed. I am getting the below logs. ( I don’t want Caddy to use the standard ports as I mentioned it is already being used by other services)
caddy -conf caddyfile.conf
Activating privacy features…2017/09/06 04:24:26 [helloworld.com] failed to get certificate: [helloworld.com] error presenting token: Could not start HTTP server for challenge → listen tcp :80: bind: address already in use
root@abcd:~/ravkumar/caddy#
Is there a way that I can force caddy to use something other than port 80 ?
From memory, -disable-http-challenge will turn off validation via HTTP-01 challenge (which uses port 80), and Caddy shouldn’t bother binding it in that case. It’ll have to rely on the TLS-SNI-01 challenge, which uses port 443.