I made sure to forward port 80 and 443 from the outside to my internal ip address (192.168.0.113) and point it to port 80 and 443 (again). I’ve also ran setcap to make sure caddy can bind to port 80 and 443, but I’m not sure I did it the right way… sudo setcap cap_net_bind_service=+ep /usr/local/bin/caddy.

I’m so desperate to the point that I ran ulimit -u 8192 /usr/local/bin/caddy (which is normally not needed).

Looks like it wasn’t a “weird server reply” so much as “the server said nothing at all and then closed the connection”.

Just to confirm, try this (again substituting your own domain name for example.com):

curl -kIL -H "Host:example.com" 192.168.0.113

We want to see a good Caddy response from this; we’re testing how it responds to a request for your domain name, we’re just connecting directly to it locally instead of resolving it through the external IP.

(doing it as above might have had it work for HTTP, redirected to the new location, which would have gone via external for HTTPS)

But if it gave you a weird server reply off the bat, it could be that the host in question (192.168.0.113) has a rogue firewall or some other issue meaning that Caddy isn’t listening on the expected ports.

Thanks for all your effort and time. Long story short, I got so frustruated (I worked on this problem for about 9 hours) I decided to do the unprofessional thing and reset my router. It worked and it let me pass. No idea why.

One big problem right now: whenever I decide to write root index.html (or just try root …), the browser gives me this error: