Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-23-2012, 05:01 AM   #1
Registered: Apr 2012
Posts: 131

Rep: Reputation: Disabled
Load Balancing in Apache Server

Assalam o Alaikum.

I am new to Load Balancing. If I create two Apache servers having two virtual hosts on each now how can I setup Load Balancing server between these two. I need step by step guideline. Thanks!
Old 05-23-2012, 07:10 AM   #2
Registered: Nov 2007
Location: India
Distribution: Debian Stable, Debian Testing
Posts: 219

Rep: Reputation: 27
Have a look here:
Old 05-24-2012, 02:49 AM   #3
Registered: Apr 2012
Posts: 131

Original Poster
Rep: Reputation: Disabled
yes it is helpful. I have also studied from some other webs and I made first try for load balancing server after googling and reading stuffs on internet. What I did in VBOX: Is this task completed??

-Web server 1:
-Web server 2:
-Load balancer Server:

Web server 1 & 2 just containing index.html in /var/www/html having contents server 1 and server 2 respectively. Load balancer Server containing following lines in httpd.conf at last:

<VirtualHost *:80>
ProxyRequests off


<Proxy balancer://mycluster>
# WebHead1
# WebHead2

# Security "technically we aren't blocking
# anyone but this the place to make those
# chages
Order Deny,Allow
Deny from none
Allow from all

# Load Balancer Settings
# We will be configuring a simple Round
# Robin style load balancer. This means
# that all webheads take an equal share of
# of the load.
ProxySet lbmethod=byrequests # may be bytraffic or bybusyness


# balancer-manager
# This tool is built into the mod_proxy_balancer
# module and will allow you to do some simple
# modifications to the balanced group via a gui
# web interface.
<Location /balancer-manager>
SetHandler balancer-manager

# I recommend locking this one down to your
# your office
Order deny,allow
Allow from all

# Point of Balance
# This setting will allow to explicitly name the
# the location in the site that we want to be
# balanced, in this example we will balance "/"
# or everything in the site.
ProxyPass /balancer-manager !
ProxyPass / balancer://mycluster/


When we write in browser "" it switches between these two web servers (server 1 and server 2) for every refresh. Is this task Ok? This work for all 3 algorithms bybusyness, byrequests and bybusyness. Is this all about load balancing in Apache server?
Old 05-24-2012, 04:26 PM   #4
Registered: Feb 2006
Posts: 30

Rep: Reputation: 2
I think its probably safe to assume you didn't read the link posted by austinium. Your question is addressed in the first couple paragraphs as Load Balancer Stickiness.


In regards to your question about if this is a problem or not, it probably isn't while the pages are static, but if you introduce sessions or anything like that, it will be an issue.

Last edited by xonogenic; 05-24-2012 at 04:28 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Load Balancing - ipvsadm with apache (mod_proxy) to another apache not working romeo_tango Linux - Server 1 01-12-2012 04:21 AM
Conceptual details about apache load balancing ganesh_gore Linux - Server 0 06-22-2010 04:49 AM
Web Server Load Balancing using ldirectord and Apache romeo_tango Linux - Server 1 02-17-2010 04:46 AM
i need help for load balancing setting apache web server gnu_gcc Linux - Server 2 06-23-2008 04:06 PM
Load Balancing software for apache coolguy_iiit Linux - General 3 08-06-2006 02:31 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:57 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration