Routing to multiple web servers on separate computers

Discussion in 'Server Operation' started by serutan, Apr 16, 2006.

  1. serutan

    serutan New Member

    I've been trying to figure out how to route web requests to several servers in my house (separate computers, not virtual roots). Say I have 3 computers mercury, venus and mars. I would like to present them to the outside world as mercury.mydomain.com, venus.mydomain.com, mars.mydomain.com. Two other things I have already done are:

    1. Configure NAT on my router to use port numbers to point to different machines, as in www.mydomain.com:8001. I don't like this because it's confusing to ordinary users.

    2. Route all port 80 requests to one machine, and in httpd.conf redirect to another machine by internal IP address. I don't like this because then the user sees a URL containing the internal IP address, so they cannot bookmark it.

    The next thing on my list is to try setting up DNS, but based on the DNS docs I've skimmed it seems kind of complicated, and frankly I'm tired of dead ends. Is DNS the right direction, or is there some simpler answer that I have missed?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Basically you can forward one port just to one computer, so if you have three web servers on port 80, you can forward port 80 to just one of them. The solution would be to use different ports for each web server.
    Another solution could be to use mod_proxy on one web server, as described in section 5 of this tutorial: http://www.howtoforge.com/configuring_apache_for_maximum_performance
     

Share This Page