Let’s say you want to access services locally, but not from outside the network. Is there still a requirement to have a valid domain name? Could you use any domain name e.g.
domain.lan that would be configured in the local DNS.
This might be useful if you want to use Caddy so you don’t have to remember non-intuitive port numbers like 8181. A Caddy block might look like:
Yes, you can use any domain you like.
But note the Automatic HTTPS activation rules:
If your domain “looks” like it could be public (see “Hostname requirements”) then Caddy will attempt to fetch a cert from a public issuer (Let’s Encrypt/ZeroSSL) unless you tell it not to, by either using HTTP explicitly (prefixing the site address with
http://) or forcing use of Caddy’s local CA (with
tls internal directive, or
local_certs global option).
So in the example I quoted, I should do the following to inhibit HTTPS activation rules?
Yeah, that’s how I’d do it.
You could alternatively specify the HTTP port (like
rslsync.domain.lan:80, since it defies convention to serve HTTPS on port 80, so Caddy won’t do it). Or turn automatic HTTPS off entirely using the global options (not recommended).
This topic was automatically closed after 29 days. New replies are no longer allowed.