I installed a nextcloud service on my NAS in a docker container and the service is reachable from the internet via a FQDN for which I generated wildcard Letsencrypt certificates.
A reverse proxy (Traefik) is dispatching requests to the service and handles http/https.
Everything works fine while outside of my LAN but connecting to nextcloud from the local network gives certificate errors.
For instance, trying to open the nextcloud home page from Firefox gives:
nextcloud.yourdomain.com uses an invalid security certificate.
The certificate is not trusted because it is self-signed.
Error code: MOZILLA_PKIX_ERROR_SELF_SIGNED_CERT
View Certificate
Clicking on "View Certificate" actually shows the router's own certificate.
As an additional information, my nextcloud service FQDN is correctly resolved to my router's public IP address even from within the LAN, i.e.
ping nextcloud.yourdomain.com
correctly returns the public IP address of my router.
How can I avoid this? Why is the router using its own certificates for https traffic to hosts that are inside my LAN instead of my my domain's Letsencrypt certificates, exactly as it's happening from outside the LAN?
Evidently the reverse-proxy or the NAS are not to be blamed as https requests are not even reaching them.
Could you help me with some additional troubleshooting?
Thanks
PI
question from:
https://stackoverflow.com/questions/65651740/router-delivering-its-own-ssl-certificates-instead-of-my-domains-to-lan-hosts 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…