Skip to content

cuyu/apache-lb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

apache-lb

Docker image of apache load balancer with sticky session enabled

Refer to https://www.youtube.com/watch?v=6gDW56dS8nU.

How to use

Create a file named app.conf and insert the hostnames you would like to be balanced like below:

BalancerMember http://10.66.1.1:8000 ROUTE=1
BalancerMember http://10.66.1.2:8000 ROUTE=2
BalancerMember http://10.66.1.3:8000 ROUTE=3

(Note: the ROUTE=<someid> is needed for sticky session.)

Then build the image and start up the container with the app.conf mounted:

docker build . -t apache-lb
docker run --name apache-lb --rm -dit -p 8080:80 -v /YOUR/PATH/app.conf:/usr/local/apache2/conf/extra/app.conf apache-lb

(Note: you can go to the /_balancer-manager to view the balancer manager page)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published