Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.
share|improve this answer
    
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. –  Thibaut Barrère Sep 14 '10 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 –  Mark Regensberg Sep 15 '10 at 7:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.