How does my DNS know where to look for this?
Comment on How to reverse proxy?
monogram@feddit.nl 7 hours ago
Caddy
It’s three lines of configuration
jellyfin.example.com { reverse_proxy http://localhost:8083/ }
Automatic https with let’sencrypt, simplicity of a single binary, downgrade is as simple as replace binary & restart service.
beeng@discuss.tchncs.de 6 hours ago
HelloRoot@lemy.lol 5 hours ago
-
you rent a domain
-
in the config (provided by the service where you rented the domain) you set it to point to the IP of the device where you run caddy
-
the service tells the relevant global DNS servers your setting
-
your DNS does a DNS lookup and a DNS server returns the IP you configured it to point to
Depending on the DNS you use, you can manually add entries to do 1-3 differently, but that will only work for devices that use your DNS
beeng@discuss.tchncs.de 5 hours ago
Is this a local address or a public IP address?
I just want the resolving internal to my network but I never got it working right.
Scrath@lemmy.dbzer0.com 3 hours ago
I’m not the guy you replied to but personally I use a setup called split-horizon DNS.
- I have a DNS server running on a raspberry pi which I have set up as the DNS server for all devices in my local network (by setting it in the router).
- This DNS server has my domain name as an A record pointing to my reverse-proxy (Nginx Proxy Manager), e.g. example.com would resolve to 192.168.0.100.
- Any subdomain I want to use is set up as a CNAME record in my DNS server referring to the previously configured A record with my domain. (jellyfin.example.com => example.com)
- Now all requests to the registered domain and subdomain are routed to my reverse-proxy which I configured to forward them to the correct service depending on the given subdomain.
This is a little bit of a simplification. I also use a cloudflare tunnel to allow access to select subdomains and I have 2 reverse-proxies chained together since NPM can resolve services by their container name as long as they are in the same docker network.
Also probably important: My DNS server was a pi-hole (until today at least) and did not act as my DHCP server. This meant it had no idea of local device hostnames and therefore was configured to forward queries to local device names to my routers built-in DNS server.
PlexSheep@infosec.pub 3 hours ago
If you want DNS only in your LAN, you need to self host a DNS server and register this domain locally (by putting it in some config file of yours)
-
MajesticElevator@lemmy.zip 6 hours ago
Fucking hell why do I use Apache 😂