I have the following setup:
- a registered domain, domain1.com, with several websites/webapps under different subdomains: sub1.domain1.com, sub2.domain1.com etc.
- on my LAN I have a pfsense router and
- a Nginx Proxy Manager(npm) which maps each website/webapp to its correct ip/port on the lan network.
What I would like to do:
- to be able to create an alias for domain1.com, let's say domain2.lan (visible only from the LAN),
- so I could be able to access sub1.domain1.com at the address sub1.domain2.lan
- to avoid duplicating all the settings in npm for domain2.lan
- also to be able to add other subdomains for services that I only expose to the LAN network, like localsub1.domain2.lan
Initially I thought that a split-brain dns (which I already have configured and working in pfsense) would help, but it actually it isn't a solution because in the Host Overrides settings you can only specify an IP, not another domain.
Also I thought I might use Domain Overrides in pfsense's Domain Resolver, but I also arrived at the conclusion that it is not the right tool, as this actually allows for an override to the DNS server that looks up for the domain you specify.
So, I want to ask if there is a kind of elegant solution to this (which avoids duplicating settings in multiple places).