How can I run multiple web servers behind a single IP address?
Archive - Originally posted on "The Horse's Mouth" - 2012-04-02 09:38:39 - Graham EllisScenario ... from last week's Linux course. I have several web servers on my network which I want to make publicly available. However, I only have a single incoming IP address, so all incoming web requests go to a single computer in my network. What can I do about this?
Option 1 - keep all the web sites on one computer (it might be easier that way anyway, for robusteness / maintainance / security / uptime considerations) and use virtual hosting. You can find our virtual hosting resources [here].
Option 2 - use an intelligent incoming router. But either this will need to be quite a sophisticated box which analyses the traffic coming in on port 80 or you'll have to use different port numbers for your various web servers and then you can rewrite them as they come in - so this means that the setup won't be transparent to external visitors.
Option 3 - have all web traffic coming to a single computer running Apache httpd with mod_proxy, forwarding traffic to each of the real servers on a per-domain basis. You can find our mod_proxy resources [here].
