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

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.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

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.

share|improve this answer
    
thank you! that helped, I finally managed to get networking configured. –  airlocker Nov 23 '11 at 1:44

Your Answer

 
discard

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.