2

I have multiple web apps hosted inside a single Ubuntu VirtualBox VM (using name-based virtual hosting in Nginx). I'm trying to ensure that each machine in my network will be able to resolve the names associated with these apps, without touching /etc/hosts on each machine.

Can I modify the configuration of the Ubuntu VM so that it will register each web app name automatically into the DNS ?

It's a network of Mac OS X machines, connected via an "Orange LiveBox" which acts as the DNS and DHCP.

The /etc/resolv.conf in the VM is:

nameserver 192.168.1.1
domain home
search home

This makes apparently http:// the-vm.home available from all machines in the network already.

Can I extend this for other names, such as http:// app2.the-vm.home ?

1 Answer 1

1

interesting scenario. I have no experience with an Orange Livebox, but I would guess it's behaves similarly to most SOHO routers?

my options in order of enthusiasm would be:

  1. hosts file (yes, I know you said you didn't want to but it really is the quickest way unless you have loads of hostnames or loads of machines)
  2. experiment with some kind of zeroconf setup on the ubuntu box (e.g. the Avahi mDNS/DNS-SD daemon) to see if you can setup local resolution for given names. This is usually used to advertise services, but by definition allows multicast name resolution
  3. setting up another local DNS server (using one of the other machines) that uses the orange livebox as a forwarder for out of zone queries, and becomes authoritive for your .home zone which will then allow you to add as many internal A records as you want for internal resolution (really killing an ant with a rocket propelled grenade, though. bit OTT). This would then become your default name server on the network.
2
  • Hi Mark - first: I cannot upvote, my reputation won't allow me, but: thanks! I read serverfault.com/questions/107270/… here that what I thought about is apparently not allowed. I will see if Avahi can help, or if I can use hosts file at least to handle subdomains in some way. Sep 14, 2010 at 22:03
  • no problem, hosts will handle anything - it's the one major advantage of it. so you can setup 10.0.0.1 any.host.name.and.subdomain and it will resolve - it doesn't need to be in a specific local zone Sep 15, 2010 at 7:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .