<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.r00tedvw.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.r00tedvw.com/index.php?action=history&amp;feed=atom&amp;title=Oracle_Linux%2FHAProxy</id>
		<title>Oracle Linux/HAProxy - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.r00tedvw.com/index.php?action=history&amp;feed=atom&amp;title=Oracle_Linux%2FHAProxy"/>
		<link rel="alternate" type="text/html" href="https://wiki.r00tedvw.com/index.php?title=Oracle_Linux/HAProxy&amp;action=history"/>
		<updated>2026-05-02T05:30:42Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.2</generator>

	<entry>
		<id>https://wiki.r00tedvw.com/index.php?title=Oracle_Linux/HAProxy&amp;diff=2957&amp;oldid=prev</id>
		<title>R00t: Created page with &quot;=Installing= Install HA Proxy is very simple if you are ok with the current version available through the repos.  &lt;nowiki&gt;~$ sudo yum install -y haproxy ~$ haproxy -v HA-Proxy...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.r00tedvw.com/index.php?title=Oracle_Linux/HAProxy&amp;diff=2957&amp;oldid=prev"/>
				<updated>2020-02-17T19:43:36Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;=Installing= Install HA Proxy is very simple if you are ok with the current version available through the repos.  &amp;lt;nowiki&amp;gt;~$ sudo yum install -y haproxy ~$ haproxy -v HA-Proxy...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Installing=&lt;br /&gt;
Install HA Proxy is very simple if you are ok with the current version available through the repos.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;~$ sudo yum install -y haproxy&lt;br /&gt;
~$ haproxy -v&lt;br /&gt;
HA-Proxy version 1.5.18 2016/05/10&lt;br /&gt;
Copyright 2000-2016 Willy Tarreau &amp;lt;willy@haproxy.org&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
=Configuration=&lt;br /&gt;
For this example i'm doing a simple least connection configuration, which means haproxy will hand the connection off to the backend server with the least number of connections.&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;~$ sudo vim /etc/haproxy/haproxy.cfg&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
# Example configuration for a possible web application.  See the&lt;br /&gt;
# full configuration options online.&lt;br /&gt;
#&lt;br /&gt;
#   http://haproxy.1wt.eu/download/1.4/doc/configuration.txt&lt;br /&gt;
#&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
# Global settings&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
global&lt;br /&gt;
    # to have these messages end up in /var/log/haproxy.log you will&lt;br /&gt;
    # need to:&lt;br /&gt;
    #&lt;br /&gt;
    # 1) configure syslog to accept network log events.  This is done&lt;br /&gt;
    #    by adding the '-r' option to the SYSLOGD_OPTIONS in&lt;br /&gt;
    #    /etc/sysconfig/syslog&lt;br /&gt;
    #&lt;br /&gt;
    # 2) configure local2 events to go to the /var/log/haproxy.log&lt;br /&gt;
    #   file. A line like the following can be added to&lt;br /&gt;
    #   /etc/sysconfig/syslog&lt;br /&gt;
    #&lt;br /&gt;
    #    local2.*                       /var/log/haproxy.log&lt;br /&gt;
    #&lt;br /&gt;
    log         127.0.0.1 local2&lt;br /&gt;
&lt;br /&gt;
    chroot      /var/lib/haproxy&lt;br /&gt;
    pidfile     /var/run/haproxy.pid&lt;br /&gt;
    maxconn     4000&lt;br /&gt;
    user        haproxy&lt;br /&gt;
    group       haproxy&lt;br /&gt;
    daemon&lt;br /&gt;
&lt;br /&gt;
    # turn on stats unix socket&lt;br /&gt;
    stats socket /var/lib/haproxy/stats&lt;br /&gt;
&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
# common defaults that all the 'listen' and 'backend' sections will&lt;br /&gt;
# use if not designated in their block&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
defaults&lt;br /&gt;
    mode                    http&lt;br /&gt;
    log                     global&lt;br /&gt;
    option                  httplog&lt;br /&gt;
    option                  dontlognull&lt;br /&gt;
    option http-server-close&lt;br /&gt;
    option forwardfor       except 127.0.0.0/8&lt;br /&gt;
    option                  redispatch&lt;br /&gt;
    retries                 3&lt;br /&gt;
    timeout http-request    10s&lt;br /&gt;
    timeout queue           1m&lt;br /&gt;
    timeout connect         10s&lt;br /&gt;
    timeout client          1m&lt;br /&gt;
    timeout server          1m&lt;br /&gt;
    timeout http-keep-alive 10s&lt;br /&gt;
    timeout check           10s&lt;br /&gt;
    maxconn                 3000&lt;br /&gt;
&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
# main frontend which proxys to the backends&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
#frontend  main *:5000&lt;br /&gt;
#    acl url_static       path_beg       -i /static /images /javascript /stylesheets&lt;br /&gt;
#    acl url_static       path_end       -i .jpg .gif .png .css .js&lt;br /&gt;
&lt;br /&gt;
#    use_backend static          if url_static&lt;br /&gt;
#    default_backend             app&lt;br /&gt;
&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
# static backend for serving up images, stylesheets and such&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
#backend static&lt;br /&gt;
#    balance     roundrobin&lt;br /&gt;
#    server      static 127.0.0.1:4331 check&lt;br /&gt;
&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
# round robin balancing between the various backends&lt;br /&gt;
#---------------------------------------------------------------------&lt;br /&gt;
#backend app&lt;br /&gt;
#    balance     roundrobin&lt;br /&gt;
#    server  app1 127.0.0.1:5001 check&lt;br /&gt;
#    server  app2 127.0.0.1:5002 check&lt;br /&gt;
#    server  app3 127.0.0.1:5003 check&lt;br /&gt;
#    server  app4 127.0.0.1:5004 check&lt;br /&gt;
&lt;br /&gt;
# [HTTP Site Configuration]&lt;br /&gt;
listen  http_web 0.0.0.0:80&lt;br /&gt;
        mode http&lt;br /&gt;
        balance leastconn  # Load Balancing algorithm&lt;br /&gt;
        option httpchk&lt;br /&gt;
        option forwardfor&lt;br /&gt;
        server apache01 rncv-apache01.virtual.local:80 weight 1 maxconn 512 check&lt;br /&gt;
        server apache02 rncv-apache02.virtual.local:80 weight 1 maxconn 512 check&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>R00t</name></author>	</entry>

	</feed>