1. Caddy version (caddy version
):
v2.4.5 h1:P1mRs6V2cMcagSPn+NWpD+OEYUYLIf6ecOa48cFGeUg=
2. How I run Caddy:
RPi 3 // Linux pidrive 5.4.72-v7+ #1356 SMP Thu Oct 22 13:56:54 BST 2020 armv7l GNU/Linux
a. System environment:
raspbian, systemctl caddy.service
b. Command:
Paste command here.
c. Service/unit/compose file:
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
d. My complete Caddyfile or JSON config:
pi@pidrive:/etc/caddy $ caddy fmt
# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
tls {
internal
}
http://homeassistant.local {
proxy 192.168.178.60:8123
}
http://uptime.local {
reverse_proxy 192.168.178.165:8050
transparent
websocket
insecure_skip_verify
}
http://heimdall.local {
reverse_proxy 192.168.178.140
transparent
websocket
insecure_skip_verify
}
http://senec.local {
reverse_proxy 192.168.178.35
transparent
websocket
insecure_skip_verify
}
http://tar1090.local {
reverse_proxy 192.168.178.165:8078
transparent
websocket
insecure_skip_verify
}
http://smokeping.local {
reverse_proxy 192.168.178.165:8085
transparent
websocket
insecure_skip_verify
}
3. The problem I’m having:
I am running th epihole as our local DNS server and this works like a charm. But now I want to achive, that I can reach my local websites/servers (some are running on the docker host 192.168.178.165 and some not) just by typing the url e.g. http://senec.local or http://heimdall.local
The url http://tar1090.local I can reach after I skipped the advise that is not a trusted site, and than the url changes to https without an valid certificate…
4. Error messages and/or full log output:
pi@pidrive:/etc/caddy $ sudo systemctl status caddy.service
â—Ź caddy.service - Caddy
Loaded: loaded (/lib/systemd/system/caddy.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2021-11-23 12:55:00 CET; 2 days ago
Docs: Welcome — Caddy Documentation
Main PID: 24527 (caddy)
Tasks: 11 (limit: 2063)
CGroup: /system.slice/caddy.service
└─24527 /usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
Nov 25 11:55:00 pidrive caddy[24527]: {“level”:“info”,“ts”:1637837700.380797,“logger”:“tls”,“msg”:“reloading managed certificate”,“identifiers”:[“senec.local”]}
Nov 25 11:55:00 pidrive caddy[24527]: {“level”:“info”,“ts”:1637837700.3810217,“logger”:“tls.renew”,“msg”:“certificate renewed successfully”,“identifier”:“heimdall.local”}
Nov 25 11:55:00 pidrive caddy[24527]: {“level”:“info”,“ts”:1637837700.3811467,“logger”:“tls.renew”,“msg”:“releasing lock”,“identifier”:“heimdall.local”}
Nov 25 11:55:00 pidrive caddy[24527]: {“level”:“info”,“ts”:1637837700.3819904,“logger”:“tls”,“msg”:“reloading managed certificate”,“identifiers”:[“heimdall.local”]}
Nov 25 11:55:00 pidrive caddy[24527]: {“level”:“warn”,“ts”:1637837700.3895543,“logger”:“tls”,“msg”:“stapling OCSP”,“error”:“no OCSP stapling for [senec.local]: no OCSP server specified in certificate”}
Nov 25 11:55:00 pidrive caddy[24527]: {“level”:“info”,“ts”:1637837700.3897347,“logger”:“tls.cache”,“msg”:“replaced certificate in cache”,“subjects”:[“senec.local”],“new_expiration”:1637880900}
Nov 25 11:55:00 pidrive caddy[24527]: {“level”:“warn”,“ts”:1637837700.390031,“logger”:“tls”,“msg”:“stapling OCSP”,“error”:“no OCSP stapling for [heimdall.local]: no OCSP server specified in certificate”}
Nov 25 11:55:00 pidrive caddy[24527]: {“level”:“info”,“ts”:1637837700.3901327,“logger”:“tls.cache”,“msg”:“replaced certificate in cache”,“subjects”:[“heimdall.local”],“new_expiration”:1637880900}
Nov 25 12:55:00 pidrive caddy[24527]: {“level”:“info”,“ts”:1637841300.3068342,“logger”:“tls”,“msg”:“cleaning storage unit”,“description”:“FileStorage:/var/lib/caddy/.local/share/caddy”}
Nov 25 12:55:00 pidrive caddy[24527]: {“level”:“info”,“ts”:1637841300.4138114,“logger”:“tls”,“msg”:“finished cleaning storage units”}
5. What I already tried:
I registerd the local urls, that I have defined as a reverse proxy in the Caddyfile, with the ip 192.168.178.55 which is the RPI on which Caddy is running.
I also tried it with a file on the pihole
/etc/dnsmasq.d/02-local.conf
with the content
address=/.local/192.168.178.55
to route every .local-domain to the Caddyserver, but this also did not work.
I have also several external domains defined in the Caddyfile and they work all perfectly, but just the internal webistes/service do not work as expected.
6. Links to relevant resources:
Thanks for all your help and assistance.