Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Apache load balancing

Options
  • 11-08-2007 5:50pm
    #1
    Closed Accounts Posts: 161 ✭✭


    I am trying to have 2 apaches running on two different servers, hosting two different sites, say "a.com" and "b.com".
    Problem is I want this within a small network, with apache running on my firewall/router to check for "a.com" or "b.com" and then redirect it to appriopriate server. I know if I had this on one machine I could use virtual hosting but the apaches running the sites need to be on different machines. I have read up on mod_proxy and i think it is possible with this, but I could just never get it setup right...

    Any ideas on this?


Comments

  • Registered Users Posts: 7,739 ✭✭✭mneylon


    Why do they have to be on two separate machines?

    Are you using NAT or do you have proper IPs?


  • Registered Users Posts: 9,579 ✭✭✭Webmonkey


    Wouldn't really be load balancing if they were on the same machine I suppose.

    Surely there are linux servers that can act as a front enabling you to set up a Virtual Server IP and then add two nodes to this (your two machines) and then do a Round Robin load balancing algorthim or something.

    At work i've configured F5 BigIP switches to do this but they quite expensive (over €60,000 a pop!)

    Came across this: http://www.linuxvirtualserver.org/ but no time to look into it.

    Good luck


  • Closed Accounts Posts: 161 ✭✭nude_hamster


    blacknight wrote:
    Why do they have to be on two separate machines?

    Are you using NAT or do you have proper IPs?

    using NAT, my hope was to have all external requests for port 80(from the internet) come to 192.168.0.1 and then that apache could tell if it was "a.com" or "b.com" and redirect a.com to port 80 on 192.168.0.2 and redirect "b.com" to port 80 on 192.168.0.3...well thats what im hoping to do,

    I was thinking maybe a NFS and then a virtual host and just use one apache, but that still leaves the full load on one machine


  • Registered Users Posts: 3,886 ✭✭✭cgarvey


    /me thinks more reading up on mod_proxy (if you're determined that the load for the sites needs to be spread).

    The easiest approach would probably be to set up virtual hosts in apache on one machine, and then within those declarations use mod_proxy to forward to the other internal machiens


  • Registered Users Posts: 7,739 ✭✭✭mneylon


    I was thinking maybe a NFS and then a virtual host and just use one apache, but that still leaves the full load on one machine

    If they are so busy why are you running them of your local network?

    In any case ... mod_proxy is probably what you need to look into


  • Advertisement
  • Registered Users Posts: 16,288 ✭✭✭✭ntlbell


    meh i should read posts more carefully



    You could mail these lads they're usually very helpfull, and explain to them you're using it for educational purposes at home.

    http://www.zeus.com/products/zxtm/


  • Closed Accounts Posts: 161 ✭✭nude_hamster


    ntlbell wrote:
    meh i should read posts more carefully



    You could mail these lads they're usually very helpfull, and explain to them you're using it for educational purposes at home.

    http://www.zeus.com/products/zxtm/

    Ya maybe I used wrong title, really wanted to do this with apache , not with another program, Thanks though :)


  • Closed Accounts Posts: 161 ✭✭nude_hamster


    blacknight wrote:
    If they are so busy why are you running them of your local network?

    In any case ... mod_proxy is probably what you need to look into

    Ya i kinda knew mod_proxy was what i needed , but i always had problem setting it up, like i had a certain setup on it, no errors, but still just appeared to do nothing, no feedback, so didnt know where it went wrong.

    I was just hoping that somebody might have tried this before, or have it done now, to point me closer to the solution than just mod_proxy.

    hmm... thanks anyways :)


  • Registered Users Posts: 16,288 ✭✭✭✭ntlbell




Advertisement