Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am currently building an web app which also utilizes websockets. (Rails for webserver and Nodejs for

I have structured my application to use subdomains to separate between connection to the Nodejs server and the Rails webserver. I have "" redirected to the Node server and everything else to the webserver.

I am able to test this functionality on localhost. I simply modified my /etc/hosts to include the following: I know that on production I simply have to generate a CNAME record for and this will also work on my users' computers.

However, I am accustomed to testing my application by passing an IP address around. My team typically set up the server on our own machines and do development. When we want to test our individual servers, we just pass around an IP like "".

With the new subdomain hack, this is no longer possible without modifying each of my tester's /etc/hosts. I honestly don't expect my testers to modify their /etc/hosts on the spot. What I can do is have each member of my team have their own domain and create the appropriate CNAME records for each individual team member.

Is there an easier way to allow me to run my app on an IP and just pass that IP around?

share|improve this question

The teams I have worked with have always done this with DNS. Either an actual, purchased domain ( something like ) or a non-standard tld on our own internal DNS server ( something like ) or a subdomain ( something like )

In each case, setting up a wildcard for each developer that pointed to his or her own machine would solve your problem. You wouldn't even need to bother passing around IP addresses any more.

share|improve this answer
This is a question and answer along my line right now - I'm interested by how the latter part of your answer works? Each developer has a wildcard? How do they USE that wildcard? – waxical Feb 4 '13 at 10:11
Your DNS entry would be * and it would resolve to the internal IP address of your computer (or VM). Each developer would have an equivalent. You would use in your browser to see your dev environment and your dev code would use to access the websocket. If you want to see your colleague's version of the code, just change the domain in your browser to use his name instead of yours. – Ladadadada Feb 4 '13 at 11:13

Your Answer


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.