i have several servers with a caddy as reverseproxy. when i try to curl to the IP with a host-header i get an error. when doing the same to my servers with a nginx it works.
this also happens with “caddyserver.com”
first get the IP
;; ANSWER SECTION: caddyserver.com. 300 IN A 18.104.22.168
now my curl:
❯ curl -k -H "Host: caddyserver.com" https://22.214.171.124 curl: (35) error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
the same error happens when i omit the HOST-Header (using “-k” should tell curl to ignore certificate errors).
doing the same with an nginx-based server works:
curl -k -H "Host: www.heise.de" https://126.96.36.199
Are there any options on caddy-side to support this “wrong” requests (although i think the requests with a given Host-Header are correct)? I have monitorings which first do a DNS-lookup with a given DNS-server (to check the correctness of the DNS) and then do a http-GET to the returned IP with different Host-Headers. sadly they do not work, i have to use the full DNS name for the query.