Disclaimer: i know, my question is not OH related at all, but somehow i googled and seem to miss the right keyword. I put all my hopes into the tech knowhow of this great board
Situation:
If have a FritzBox Cable as Router (and DNS server and âeverythingâ) behind that i run a NUC with unbuntu called âopenhabâ as servername. I run openhab and several other things (nginx, monitorix) in docker there, having nginx as reverse proxy
However, since i called my server âopenhabâ, i have to configure my nginx reverse proxy to sub locations ( like /monitorix/)
I wish i could just have http://monitorix as a virtual host. NGINX wise, no problem.
Question:
But how do i tell the DNS on the FritzBox to resolv âmonitorixâ to the openhab server as well?
Real Usecase:
In case you find http://openab/monitorix pretty decent, since it is the monitorix for OH. True. My other usacase is, that i consider running squidguard as a proxy server. Doing so, i would want to autoconfig the proxy settings of all devices around. Fot that i would need WPAD as a servername to deliver autoconfigto the client. Renaming openhab to wpad is not wantedâŠ
You need to bind multiple IP-Addresse to your network interface, instructions can be found here
Next step is adding different hostnames to the IPâs.
After this, you should be able to configure NGINX to redirect the different Addresses to your sevices.
Hmm - to add a second ip to the interface works easily. Unfortunately the FritzBox does not recognize that IP as diefferent device, so i could name it properly .
Yes, i could take away the dhcp & dns topic fro the fritzbox, but that is some effort i want to avoid, since i add to many new single points of failure to my setup :-/
I know that I am not helping⊠but I would recommend deploying DNS & DHCP for your LAN on the Linux host running OH2 Itâs not too hard and if you donât want to mess with config files, take a look at webmin.
You can then add aliases on the DNS to point to the OH2 IP Address.
I donât think that you can do much with the FritzBox DNS.
even if you succeed with this, this would apply only to the local linux host name resolutions. You wonât be able to resolve the extra aliases from another host on your LAN.
I am not sure that I got itâŠ
You could setup your DHCP to assign both hosts (Linux + Fritz) for DNS entries (Linux primary and Fritz secondary) to the LAN clients. If NUC goes down, you will still be able to access the interweb (but wonât be able to resolve the custom aliases).
correct⊠but usually a linux (NUC) box is very reliable (and highly configurable). In theory, you would be running it 24/7 anyway.