Single Machine, multiple web servers, single IP Name -- How?
Maybe via nginx?- I don't know how to configure it to honor a "localhost:port_number" with which to do forward/reverse proxying.
Maybe via squid? (I have no experience yet with this-but will learn/investigate if needed)
maybe iptables? (I have no experience yet with this-will learn)
I have googled around, but have not hit on a combo of terms that leads me to a discussion of a similar issue or an answer.
Background/My Current Setup: In case I have not connected with the reader on my description of my issue, perhaps this background on what I am doing now will help clarify.
I have a linode to which I have root access and on which I have administered Ubuntu 10.04 , and I am comfortable installing new software.
This Linode has multiple webservers, eg webserver1 runs Drupal under apache2prefork instance, webserver2 runs Django under separate apache2 multithread-model instance, webserver3 runs xyz server running on someotherhttpd, all running on the one Linode Ubuntu 10.04 machine, where any given webserver/httpd process is the one and only 'listener' on a dedicated port number.
For example, webserver1 listens on port 8081, webserver 2 listens on 8082, … ad infinitum (I want to provide services using various webservers).
I have purchased multiple domain names.
I have set up nginx and the multiple instances of apache2 (with different threading models) such that requests to domainname1.com all go to webserver1, say listening on port 8081, and requests to domainname2.com all go to webserver2, and it works well.
However, this approach has disadvantages:
I have had to purchase and maintain registration on multiple IP domain names, and I want to save some administration money and hassle.
I'd rather tell users a single domain name to use and limit user confusion.
I want the webservers to interlink 'seamlessly' as far as the user is concerned, always showing the same IP name in the URL location field of their browsers (It's ok if a sub-path of the URL differs).
So - I want to go back to a single domain name.
Thanks for your tips! Maybe I just need another special term to apply in my google searching to find more info?
2 Replies
Thanks for the pointer! Works beautifully!