Unrecognized directive: tsl

Welcome to the Caddy club :slight_smile:

Just a couple of notes:

  1. That’s a very old document you’re referencing.
  2. There’s a small typo in your config. It should be tls, not tsl.

HTTP only:

{
    auto_https off
}

http://localhost {
    respond "Hello HTTP world"
}

HTTPS with HTTP-to-HTTPS redirect and internal certificate

localhost {
    tls internal
    respond "Hello HTTPS world"
}

Separate HTTP and HTTPS with internal certificate:

{
    auto_https disable_redirects
}

http://localhost {
    respond "Hello HTTP world"
}

https://localhost {
    tls internal
    respond "Hello HTTPS world"
}
1 Like