1

I am a developer with not much networking experience, here is my situation:

I have a server with one reputable provider, managed to get Xen running with lots of LVM space to get around 3 virtual machines running which should suit my needs. The trouble is that I only have access to one single IP address and my options are limited for now.

My question might sound stupid, but please can you tell me whether it is somehow possible to redirect traffic based on hostname only, something like this below (all on port 80)

www.host1.com --> Hardware Server -> VM1

www.host2.com --> Hardware Server -> VM2

www.host3.com --> Hardware Server -> VM3

It is routing as I imagine, but not sure where to start. Note that the hosts are required to be on separate VM as they are running on different setups and have different needs in terms of availability/os etc.

user9517
  • 114,104
  • 20
  • 206
  • 289
airlocker
  • 13
  • 3

1 Answers1

4

Yes, it's possible. You can use any HTTP reverse proxy you like. Options include Squid, Apache, or Nginx. The reverse proxy listens on port 80 on the public IP address, looks at the query to see what server it needs to go to, and connects to the appropriate local server on a private IP.

David Schwartz
  • 31,215
  • 2
  • 53
  • 82