Dynamic local network names for virtual hosts

3

I've configured a virtual machine for use as a web development platform to distribute to web developers in my company. Currently, I have the install script for each site creating a new virtual host on a new port so we can use root level links on the sites correctly. Each site has a link that looks like: http://192.168.1.100:8080/, http://192.168.1.100:8081/, etc. These addresses are difficult to remember for me and I certainly don't want to ask others keep ports mapped to sites in their heads. I would really like to create a new local network scoped name for each virtual host and broadcast its presence with something like NetBIOS or Bonjour or both so the host machine won't have to be configured to use the network name.

In short, I want to dynamically create new local network names to point to various Apache virtual hosts on a virtual machine that will be platform ambiguous so the host operating system can be Windows, OS X, or Linux. All configuration should be done on the virtual machine so that the host will require zero configuration.

Jonathan Swinney

Posted 2011-05-04T14:58:11.470

Reputation: 143

Should I repost over on ServerFault? – Jonathan Swinney – 2011-05-04T15:49:54.860

Answers

0

This would be relatively simple if you can get a wildcard DNS entry (*.test.example.com). Then you could modify your virtual host creation script to create new sites based on name rather than port number.

Xenoactive

Posted 2011-05-04T14:58:11.470

Reputation: 11

Ok, if I create a wildcard A record on my name server for something like *.testing.example.com., how would I map it back to the virtual machine that is only accessible inside the local area network? – Jonathan Swinney – 2011-05-04T16:46:40.720

@Jonathan Swinney you could have a local dns setup which can handle this for you – datatoo – 2011-06-22T15:47:50.043