Linux How to..

Linux How to ,Share Knowledge

HA Proxy with session support

Nov-19-2012 By admin

TAG : how to install HA Proxy with session support

example ?: ?HA Proxy user internet ?access to ?round robin to Web1 and Web2 ?with web server ?session support

HAProxy: port 80

Web1 : port 80

Web2 : port 80

install haproxy
Compile the sources with `make install`

#tar -zxvf ?haproxy-1.4.20.tar.gz

#cd haproxy-1.4.20

#make install

#cp haproxy /usr/sbin/haproxy

+Download a sample config file
#wget -O /etc/haproxy.cfg
+Download a launcher
#wget -O /etc/init.d/haproxy
+adjust the startup settings
#chmod +x /etc/init.d/haproxy
#chkconfig –add haproxy

#chkconfig haproxy on

vim /etc/haproxy.cfg

input line below :

listen webfarm
mode http
balance source
cookie JSESSIONID prefix
option httpchk HEAD /check.txt HTTP/1.0
option httpclose
option forwardfor
server web1 cookie A check
server web2 cookie B check
installed success

  1. Linux How to.. » Blog Archive » Articles Said,

    […] HA Proxy with session support […]

Add A Comment