Thursday | 21 NOV 2024
[ previous ]
[ next ]

Dumb things (Caddy)

Title:
Date: 2022-01-01
Tags:  

This is strictly because I didn't read the caddy documentation and tried to google my problems. I was use a really bare bones configuration for caddy to just try it out and i wasn't getting the https stuff to work.

My Caddyfile looked like the following:

:7088 {
    respond "Hello, World!"
}

This was resulting in the following errors:

Firefox:

SSL_ERROR_RX_RECORD_TOO_LONG

Chrome:

ERR_SSL_PROTOCOL_ERROR

Curl:

curl: (35) SSL received a record that exceeded the maximum permissible length.

The http version of the page was working perfectly fine but https was throwing weird errors. From what I could tell the certificate was getting installed properly to ~/.local/share/caddy/pki/authorities/local.

I finally stumbled into actually reading the documentation.

https://caddyserver.com/docs/automatic-https

Specifically the part about activation says that listening exclusively on a port prevents automatic https.

So adding the ip address immediately fixed the issue.

192.168.1.70:7088 {
    respond "Hello, World!"
}

Now the web page works!

Bah!