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:,, 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.

This is a repost from super user.


This isn't an exact answer but we had a similar problem and solved it in a different way which has worked well. Each of our developers get a wildcard entry like:

 '*.username.dev.domain.com' and 'username.dev.domain.com'

These are setup on an internal DNS server using views so it is only visible internal to the company. This also allowed us to setup different IPs for these externally to map to a firewall that can pass ports in if a developer does need to do some Internet accessible testing temporarily.

Port 80 on the IP for *.someuser.dev.domain.com goes to an nginx instance. On the nginx instance we have server configurations setup that map:

 app1.someuser.dev.domain.com -> localhost:2180
 app2.someuser.dev.domain.com -> localhost:2280

This had a couple benefits:

  • we don't have to setup new DNS entries for new services
  • the developers have easy to remember names
  • it more closely matches production (where everything is on port 80 and we use nginx there too)
  • can also map apps into someuser.dev.domain.com/app3 -> somehost:someport
  • made SSL easy for testing (just setup a wildcard cert, no need to specify multiple ports)
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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