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

I'd like to set up a series of local development servers using the same IP address and different domain names, although I'm not sure about how to set it all up.

I created the following domains server1.something.com, server2.something.com - all these domains have DNS records for the same IP address.

My question is, how can I get this to work if I have multiple machines, for example one Mac OS X machine has MAMPP installed and another Windows machine has XAMPP installed to work exactly if the single IP address is behind a router? These local development services also need to be accessed outside of the network. I'm assuming that there would need to be a combination of port changing or virtual hosts, but if someone could help me out I'd really appreciate it.

Thanks in advance

share|improve this question

closed as off topic by Jason Berg, womble, Ward, Iain, Shane Madden Sep 18 '11 at 18:14

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
If I read the question correctly you have one IP address for multiple machines within the one network. Just how do you expect that to work? –  John Gardeniers Sep 18 '11 at 6:13

2 Answers 2

Virtual hosting is used to serve multiple domain names from the same machine.

You need something like a reverse proxy or a Load Balancer (HA Proxy) to distribute the network traffic across multiple nodes. Each node on the network (web server) would have identical copies of all website files and access to a central DB (separate machine). This ensures that wherever it sends network traffic, the user will be served the same application (files/DB).

I've done this using rsync and lsync (Ruby) to copy the files and a separate cluster of DB servers.

More info: http://en.wikipedia.org/wiki/Reverse_proxy

share|improve this answer

You will need a reverse proxy in order to steer the same IP to different physical servers.

share|improve this answer

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