-2

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

Eypeon
  • 1
  • 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 06:13

2 Answers2

1

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

Trent Scott
  • 959
  • 1
  • 12
  • 28
0

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

user48838
  • 7,431
  • 2
  • 18
  • 14