Nginx server: How to handle host name resolving

    • OMV 3.x

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Nginx server: How to handle host name resolving

      Hi guys,

      I have a rather general question about how I shall handle DNS and name resolving when using nginx on my OMV server to serve some websites.

      Currently, I’m hosting some projects on a “real” web server, but I’d like to host them locally since I only use those at home (and I’m getting tired of long URLs like user.server.provider.tld/projectname).

      All my devices, including the OMV server, are accessible through as well as hostname.local. Ideally, I want my web projects to be accessible at web.local/projectname or simply projectname.local

      Right now, I can access them (using the nginx plugin) when I’m using a port based setting, such as omv.local:81/project. Which is fine, but rather ugly. But it doesn’t work name-based — no matter what name I’m using.

      As far as I understand, that’s because nothing in my network knows how to resolve the name I chose, which is “web” in this case (for web.local/). To solve this, I need to be able to assign multiple hostnames / aliases to a single ip / device, right? But my Fritz-Box router, which is responsible for DNS handling in my network, isn’t capable of that. I can choose to replace an existing hostname, but can’t assign multiple names to a single device, since it requires a unique hostname for every MAC address.

      I’d rather not install Freetz on my router, because it looks like its not actively developed anymore. Also, AVM routers aren’t compatible with OpenWRT.

      So, how am I supposed to achieve what I have in mind? Do I need to add something like a RaspberryPi to my network and let it handle my DNS requests? Or do I have a wrong idea of how this works?

      Any help or advice is greatly appreciated.