Hi
I have a frontend caddy on a vps, a wireguard tunnel to my homeserver that serves a backend caddy.
Https is working when accessing my domain both from the internet and inside my lan, but I want to use the lan address when inside the lan with https(I’m on a LTE subscription with a data cap).
I’ve also setup the dns in my lan so that I can use the external domain name locally.
So I guess there is a way for the backend caddy to differentiate between the requests from the wireguard tunnel vs the LAN. Thing is I don’t know how
I’ve setup unify to only be reached via lan so that’s sorted, but it’s the ha and immich that I need help with.
2. Error messages and/or full log output:
3. Caddy version:
v2.10.2 with cloudflare module
4. How I installed and ran Caddy:
Frontend, via apt-get on debian and then copied the caddy binary with cloudflare module as in the wiki
Backend, docker cointainer
I’m not sure I follow why you need to differentiate them? What are you trying to do with that?
Enable access logs (log directive), compare what the requests look like when they come via wireguard vs LAN, see if the remote address is different, if so you can use remote_ip matcher to change it.
Then you just need to override your DNS in your LAN (run a DNS server, or something like pihole or adguard which are also DNS servers) so that your domain resolves to your LAN IP instead of your VPS IP while inside your LAN.