{"id":17618,"date":"2024-11-22T08:56:42","date_gmt":"2024-11-22T08:56:42","guid":{"rendered":"https:\/\/truehost.com\/support\/?post_type=docs&#038;p=17618"},"modified":"2024-11-25T06:39:29","modified_gmt":"2024-11-25T06:39:29","password":"","slug":"how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux","status":"publish","type":"docs","link":"https:\/\/www.truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/","title":{"rendered":"How to Install and Configure HAProxy for Load Balancing on Almalinux"},"content":{"rendered":"\n<p>HAProxy, or High Availability Proxy, is a highly effective open-source tool for HTTP load balancing and proxying. It improves website and application performance by distributing traffic across multiple backend servers. This helps reduce response times, increase throughput, and ensure your services remain available even during high traffic periods.<\/p>\n\n\n\n<p>While the standard version of HAProxy is free, there&#8217;s also a commercial version called HAProxy Enterprise. It offers additional features, expert support, and professional services for those who need extra functionality or assistance.<\/p>\n\n\n\n<p>No matter which version you choose, HAProxy offers a variety of load balancing methods to suit different needs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Round Robin:<\/strong> Distributes traffic evenly among servers in a rotating order.<\/li>\n\n\n\n<li><strong>Least Connections:<\/strong> Routes traffic to the server with the fewest active connections, making it ideal for servers with varying performance capabilities.<\/li>\n\n\n\n<li><strong>Least Time:<\/strong> Sends requests to the server that responds the fastest.<\/li>\n\n\n\n<li><strong>Source IP Hash:<\/strong> Ensures requests from the same IP address are consistently routed to the same server by using a hash function.<\/li>\n\n\n\n<li><strong>Random with Two Choices:<\/strong> Picks two servers randomly and sends the request to the one with fewer connections.<\/li>\n<\/ul>\n\n\n\n<p>In this guide, we\u2019ll show you how to install and set up HAProxy on Almalinux 9. We will use <strong>Round Robin<\/strong> as the load-balancing method.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>SET UP<\/strong><\/h3>\n\n\n\n<p>For the purpose of demonstrating this, we have a set up that looks like this<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th><strong>Node<\/strong><\/th><th><strong>Hostname<\/strong><\/th><th><strong>IP address<\/strong><\/th><\/tr><\/thead><tbody><tr><td>HAProxy<\/td><td>loadba.tke.co.ke<\/td><td>102.212.245.130<\/td><\/tr><tr><td>Web Server 1<\/td><td>node-a.tke.co.ke<\/td><td>102.212.245.54<\/td><\/tr><tr><td>Web Server 2<\/td><td>node-b.tke.co.ke<\/td><td>102.212.246.99<\/td><\/tr><tr><td>Web Server 3<\/td><td>node-c.tke.co.ke<\/td><td>102.212.245.17<\/td><\/tr><tr><td><\/td><td><\/td><td><\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\">Demo Set up<\/figcaption><\/figure>\n\n\n\n<p><strong>Step 1: Configure Hostnames (All Nodes)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We will assign hostnames for each ot the nodes. The hostnames are valid subdomain, each pointing to the respective node&#8217;s IP, as in the table above.<\/li>\n\n\n\n<li>We will use the command below to assign hostname<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo hostnamectl set-hostname loadba.tke.co.ke\n\nexec bash<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"65\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-536.png\" alt=\"\" class=\"wp-image-17624\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-536.png 793w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-536-300x25.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-536-768x63.png 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo hostnamectl set-hostname node-a.tke.co.ke\n\nexec bash<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"798\" height=\"75\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-535.png\" alt=\"\" class=\"wp-image-17623\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-535.png 798w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-535-300x28.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-535-768x72.png 768w\" sizes=\"auto, (max-width: 798px) 100vw, 798px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo hostnamectl set-hostname node-b.tke.co.ke\n\nexec bash<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"754\" height=\"78\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-534.png\" alt=\"\" class=\"wp-image-17622\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-534.png 754w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-534-300x31.png 300w\" sizes=\"auto, (max-width: 754px) 100vw, 754px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo hostnamectl set-hostname node-c.tke.co.ke\n\nexec bash<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"665\" height=\"65\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-533.png\" alt=\"\" class=\"wp-image-17621\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-533.png 665w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-533-300x29.png 300w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><\/figure>\n\n\n\n<p><strong>Step 2: Install vim on each node<\/strong> (optional if you use nano)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You will need the vim editor for the next step. Use the command below to install it<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install vim -y<\/code><\/pre>\n\n\n\n<p><strong>Step 3: Configure \/etc\/hosts file for All Nodes<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Let&#8217;s now set all the nodes to communicate seamlessly in the environment. You do that by configuring \/etc\/hosts file for each node<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vi \/etc\/hosts<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Then add the following lines;<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>102.212.245.130 &nbsp; loadba.tke.co.ke\n102.212.245.54 &nbsp; node-a.tke.co.ke\n102.212.246.99 &nbsp; node-b.tke.co.ke\n102.212.245.17 &nbsp; node-c.tke.co.ke<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"877\" height=\"178\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-537.png\" alt=\"\" class=\"wp-image-17625\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-537.png 877w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-537-300x61.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-537-768x156.png 768w\" sizes=\"auto, (max-width: 877px) 100vw, 877px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Save the files and exit, then do a ping test on each node or each of the other nodes.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"136\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-538-1024x136.png\" alt=\"\" class=\"wp-image-17626\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-538-1024x136.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-538-300x40.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-538-768x102.png 768w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-538.png 1099w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 4: Install HAProxy on Almalinux 9 Load Balancer<\/strong> (<strong>loadba.tke.co.ke<\/strong>)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We will now install the HA Proxy on the load balancee node, but first we&#8217;ve got to update system packages<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf update<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Then install the package<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install haproxy -y<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"211\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-539-1024x211.png\" alt=\"\" class=\"wp-image-17629\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-539-1024x211.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-539-300x62.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-539-768x158.png 768w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-539-1536x317.png 1536w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-539.png 1663w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once done, you can check the HA Proxy version using the command below<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>rpm -q haproxy<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You can get the same info and much more by including the -i option<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>rpm -qi haproxy<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>From the result, you will have rich information on the name, version, release, architecture, and installation date among other details. Our output, shows that we have installed HAProxy version 2.4.22.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"358\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-540-1024x358.png\" alt=\"\" class=\"wp-image-17630\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-540-1024x358.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-540-300x105.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-540-768x269.png 768w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-540-1536x537.png 1536w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-540.png 1796w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 5: Configure HAProxy<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Next will be to configure HA Proxy to serve requests to our three back-end servers. Before that, we will first make a copy of the HA Proxy configuration file, before we start editing it. Use the command below. A file called <strong>haproxy.org<\/strong> will be created in <strong>\/etc\/haproxy\/<\/strong> with content of <strong>haproxy.cfg<\/strong><\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo cp \/etc\/haproxy\/haproxy.cfg{,.orig}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Now we need to configure these settings;\n<ul class=\"wp-block-list\">\n<li><strong>Front-end settings&nbsp;<\/strong>tospecify the sockets coming from client connections.<\/li>\n\n\n\n<li><strong>Back-end settings<\/strong>&nbsp;to specify the HAProxy server IP address and the load balancer algorithm.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Front-End Settings<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the haproxy config file using the command below <\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vim \/etc\/haproxy\/haproxy.cf<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Navigate to a section called <strong>#Front load balancer<\/strong>. Check to confirm that you have these lines of code. Replace 102.212.245.130:80 with your HA Proxy node IP.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Front load balancer\n\nfrontend load_balancer\n    bind 102.212.245.130:80\n    option http-server-close\n    option forwardfor\n    stats uri \/haproxy?stats\n\ndefault_backend   webservers<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"140\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-541-1024x140.png\" alt=\"\" class=\"wp-image-17631\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-541-1024x140.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-541-300x41.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-541-768x105.png 768w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-541.png 1099w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Back-End Settings<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Here we will specify <strong>roundrobon<\/strong> as the load-balancing algorithms. Also, we will specify the back-end servers alondode their hostnames and IP Addresses<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>backend webservers\n    mode        http\n    balance     roundrobin\n\n    option httpchk HEAD \/ HTTP\/1.1\\r\\nHost:\\ localhost\n    server node-a.tke.co.ke  102.212.245.54:80  check\n    server node-b.tke.co.ke  102.212.246.99:80  check\n    server node-c.tke.co.ke  102.212.245.17:80  check\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"182\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-551-1024x182.png\" alt=\"\" class=\"wp-image-17652\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-551-1024x182.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-551-300x53.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-551-768x136.png 768w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-551.png 1183w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Statistics Settings<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>To view the load balancer statistics in a web browser, add the following block of code to the configuration file. Replace 102.212.245.130 with your HA Proxy node IP,<\/li>\n\n\n\n<li>Also in the code bellow, note the line with <strong>stats auth admin:P@ss!# <\/strong> and replace <strong>admin<\/strong> and <strong>P@ss!#<\/strong> with a username and password of choice. Note them for later use.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>listen stats\n    bind  102.212.245.130:80      # Bind stats to port 80\n    log   global             # Enable Logging\n    stats enable             # enable statistics reports \n    stats hide-version       # Hide the version of HAProxy\n    stats refresh 30s        # HAProxy refresh time\n    stats show-node          # Shows the hostname of the node\n<strong>    stats auth admin:P@ss!#   # Authentication for Stats page\n<\/strong>    stats uri \/stats     # Statistics URLi<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"225\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-544-1024x225.png\" alt=\"\" class=\"wp-image-17638\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-544-1024x225.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-544-300x66.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-544-768x169.png 768w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-544.png 1078w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Save the changes and exit the configuration file.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p><strong>Step 6: Configure SELinux<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Next will be to set SE Linux on HA Proxy node to allow access to HTTP Traffic. You can use these commands<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo setenforce 0\n\nsudo sed -i 's\/SELINUX=enforcing\/SELINUX=permissive\/g' \/etc\/selinux\/config<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"102\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-543-1024x102.png\" alt=\"\" class=\"wp-image-17635\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-543-1024x102.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-543-300x30.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-543-768x77.png 768w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-543.png 1084w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 7: Configure Rsyslog<\/strong><\/p>\n\n\n\n<p>To keep tabs on HAProxy\u2019s performance, it\u2019s recommended that you configure log files that will store logs generated by HAProxy.<strong> Rsyslog<\/strong> is a utility supports loggin and provides a way to collect and centralize logs<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Access <strong>Rsyslog<\/strong> configuration file<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vim \/etc\/rsyslog.conf<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Then add the following lines, to the file.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>local2.=info     \/var\/log\/haproxy-access.log\n\nlocal2.notice    \/var\/log\/haproxy-info.log<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"151\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-549.png\" alt=\"\" class=\"wp-image-17650\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-549.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-549-300x44.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-549-768x113.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 8: Start and Enable HAProxy<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl start haproxy\n\nsudo systemctl enable haproxy<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-style-zoooom\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"139\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-550-1024x139.png\" alt=\"\" class=\"wp-image-17651\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-550-1024x139.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-550-300x41.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-550-768x104.png 768w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-550.png 1233w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 8: Install Apache Web Server on Web Servers<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We are will now configure the back-end servers so that they server the traffic. We wil do tha  by installing Apache on each of them. If you prefer Litespeed or Nginx, you can give it a swing. Run the commands below on each of the web servers.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf update\n\nsudo dnf install httpd -y<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1021\" height=\"259\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-547.png\" alt=\"\" class=\"wp-image-17645\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-547.png 1021w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-547-300x76.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-547-768x195.png 768w\" sizes=\"auto, (max-width: 1021px) 100vw, 1021px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Once done, you can now create a test web-page for each server for the purpose of simulating the roundrobin load balancing algorithim<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo vim&nbsp; \/var\/www\/html\/index.html<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Then put these lines of code<\/li>\n<\/ul>\n\n\n\n<p><strong>For  Web Server 1<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n    &lt;title&gt;Welcome to Web Server 01&lt;\/title&gt;\n    &lt;style&gt;\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #f4f4f9;\n            color: #333;\n            text-align: center;\n            padding: 20px;\n        }\n        h1 {\n            color: #4CAF50;\n        }\n        p {\n            font-size: 1.2em;\n            margin: 10px auto;\n            max-width: 600px;\n        }\n        .server-info {\n            font-weight: bold;\n            color: #555;\n            margin-top: 20px;\n        }\n        footer {\n            margin-top: 40px;\n            font-size: 0.9em;\n            color: #888;\n        }\n    &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;h1&gt;Welcome to node-a.tke.co.ke ?&lt;\/h1&gt;\n    &lt;p&gt;Your request has been successfully served! This page is brought to you by Web Server 01, ensuring a smooth and reliable experience.&lt;\/p&gt;\n    &lt;div class=\"server-info\"&gt;\n        Server IP: &lt;strong&gt;192.168.1.101&lt;\/strong&gt;&lt;br&gt;\n        Load Balancer: Active\n    &lt;\/div&gt;\n    &lt;footer&gt;\n        &amp;copy; 2024 Web Server 01 | Powered by Your Reliable Hosting\n    &lt;\/footer&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<p><strong>For Web Server 2<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n    &lt;title&gt;Welcome to Web Server 01&lt;\/title&gt;\n    &lt;style&gt;\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #f4f4f9;\n            color: #333;\n            text-align: center;\n            padding: 20px;\n        }\n        h1 {\n            color: #4CAF50;\n        }\n        p {\n            font-size: 1.2em;\n            margin: 10px auto;\n            max-width: 600px;\n        }\n        .server-info {\n            font-weight: bold;\n            color: #555;\n            margin-top: 20px;\n        }\n        footer {\n            margin-top: 40px;\n            font-size: 0.9em;\n            color: #888;\n        }\n    &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;h1&gt;Welcome to node-b.tke.co.ke ?&lt;\/h1&gt;\n    &lt;p&gt;Your request has been successfully served! This page is brought to you by Web Server 01, ensuring a smooth and reliable experience.&lt;\/p&gt;\n    &lt;div class=\"server-info\"&gt;\n        Server IP: &lt;strong&gt;192.168.1.101&lt;\/strong&gt;&lt;br&gt;\n        Load Balancer: Active\n    &lt;\/div&gt;\n    &lt;footer&gt;\n        &amp;copy; 2024 Web Server 01 | Powered by Your Reliable Hosting\n    &lt;\/footer&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<p><strong>For Web Server 3<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n    &lt;title&gt;Welcome to Web Server 01&lt;\/title&gt;\n    &lt;style&gt;\n        body {\n            font-family: Arial, sans-serif;\n            background-color: #f4f4f9;\n            color: #333;\n            text-align: center;\n            padding: 20px;\n        }\n        h1 {\n            color: #4CAF50;\n        }\n        p {\n            font-size: 1.2em;\n            margin: 10px auto;\n            max-width: 600px;\n        }\n        .server-info {\n            font-weight: bold;\n            color: #555;\n            margin-top: 20px;\n        }\n        footer {\n            margin-top: 40px;\n            font-size: 0.9em;\n            color: #888;\n        }\n    &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;h1&gt;Welcome to node-c.tke.co.ke ?&lt;\/h1&gt;\n    &lt;p&gt;Your request has been successfully served! This page is brought to you by Web Server 01, ensuring a smooth and reliable experience.&lt;\/p&gt;\n    &lt;div class=\"server-info\"&gt;\n        Server IP: &lt;strong&gt;192.168.1.101&lt;\/strong&gt;&lt;br&gt;\n        Load Balancer: Active\n    &lt;\/div&gt;\n    &lt;footer&gt;\n        &amp;copy; 2024 Web Server 01 | Powered by Your Reliable Hosting\n    &lt;\/footer&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"498\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-548-1024x498.png\" alt=\"\" class=\"wp-image-17648\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-548-1024x498.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-548-300x146.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-548-768x374.png 768w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-548.png 1276w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Save the changes and exit.<\/li>\n<\/ul>\n\n\n\n<p><strong>Step 10: Test the HAProxy Load Balancer<\/strong><\/p>\n\n\n\n<p>With all done, let&#8217;s see if the load balancing round-robin works by accessing each of the webpages<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;102.212.245.54\nhttp:\/\/102.212.246.99\nhttp:\/\/102.212.245.17<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When you first the pages, you will first see the same page from the three web servers<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"923\" height=\"434\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-552.png\" alt=\"\" class=\"wp-image-17655\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-552.png 923w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-552-300x141.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-552-768x361.png 768w\" sizes=\"auto, (max-width: 923px) 100vw, 923px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>When you reload the pages, you will see a response being served by the second web server<\/li>\n\n\n\n<li>Another reload will have requests served by the third web server<\/li>\n\n\n\n<li>In addition, you can view statistics using the following URL, where <strong>haProxy_IP_Address<\/strong> is the IP of the ha-proxy node<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;haProxy_IP_Address\/stats<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>An authentication pop-up will appear. Provide the username and password specified in the \u2018<strong>Statistics<\/strong>\u2019 section under <strong>Statistics Settings<\/strong> section, and click \u2018<strong>Sign in<\/strong>\u2019.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"412\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-553.png\" alt=\"\" class=\"wp-image-17656\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-553.png 662w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-553-300x187.png 300w\" sizes=\"auto, (max-width: 662px) 100vw, 662px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>You will see the HAProxy statistics report page on your browser.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"445\" src=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-554-1024x445.png\" alt=\"\" class=\"wp-image-17657\" srcset=\"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-554-1024x445.png 1024w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-554-300x130.png 300w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-554-768x334.png 768w, https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-554.png 1277w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Author&#8217;s Final Word<\/h2>\n\n\n\n<p>This guide has covered the installation of HAProxy on RHEL 9. As a load balancer, HAProxy is essential for efficiently managing network traffic, reducing downtime by intelligently routing web traffic to available nodes while faulty ones are repaired and brought back online.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>HAProxy, or High Availability Proxy, is a highly effective open-source tool for HTTP load balancing and proxying. It improves website and application performance by distributing traffic across multiple backend servers. This helps reduce response times, increase throughput, and ensure your services remain available even during high traffic periods. While the standard version of HAProxy is [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"_eb_attr":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"doc_category":[1820,1824,1879,2128],"doc_tag":[],"class_list":["post-17618","docs","type-docs","status-publish","hentry","doc_category-cloud-servers-in-kenya","doc_category-dedicated-servers","doc_category-servers","doc_category-vps-servers"],"year_month":"2026-06","word_count":1782,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"Eugene","author_nicename":"eugene","author_url":"https:\/\/www.truehost.com\/support\/author\/eugene\/"},"doc_category_info":[{"term_name":"Cloud servers in Kenya","term_url":"https:\/\/www.truehost.com\/support\/docs-category\/cloud-servers-in-kenya\/"},{"term_name":"dedicated servers","term_url":"https:\/\/www.truehost.com\/support\/docs-category\/dedicated-servers\/"},{"term_name":"Servers","term_url":"https:\/\/www.truehost.com\/support\/docs-category\/servers\/"},{"term_name":"VPS-Servers","term_url":"https:\/\/www.truehost.com\/support\/docs-category\/vps-servers\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install and Configure HAProxy for Load Balancing on Almalinux -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install and Configure HAProxy for Load Balancing on Almalinux -\" \/>\n<meta property=\"og:description\" content=\"HAProxy, or High Availability Proxy, is a highly effective open-source tool for HTTP load balancing and proxying. It improves website and application performance by distributing traffic across multiple backend servers. This helps reduce response times, increase throughput, and ensure your services remain available even during high traffic periods. While the standard version of HAProxy is [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-25T06:39:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-536.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\\\/\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\\\/\",\"name\":\"How to Install and Configure HAProxy for Load Balancing on Almalinux -\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/image-536.png\",\"datePublished\":\"2024-11-22T08:56:42+00:00\",\"dateModified\":\"2024-11-25T06:39:29+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\\\/#primaryimage\",\"url\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/image-536.png\",\"contentUrl\":\"https:\\\/\\\/truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/image-536.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/truehost.com\\\/support\\\/knowledge-base\\\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install and Configure HAProxy for Load Balancing on Almalinux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#website\",\"url\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\",\"name\":\"\",\"description\":\"Help In a Click\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#organization\",\"name\":\"Truehost Kenya\",\"url\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"contentUrl\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/wp-content\\\/uploads\\\/2026\\\/04\\\/cropped-image_2026-04-16_174808866.png\",\"width\":240,\"height\":48,\"caption\":\"Truehost Kenya\"},\"image\":{\"@id\":\"https:\\\/\\\/www.truehost.com\\\/support\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install and Configure HAProxy for Load Balancing on Almalinux -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/","og_locale":"en_US","og_type":"article","og_title":"How to Install and Configure HAProxy for Load Balancing on Almalinux -","og_description":"HAProxy, or High Availability Proxy, is a highly effective open-source tool for HTTP load balancing and proxying. It improves website and application performance by distributing traffic across multiple backend servers. This helps reduce response times, increase throughput, and ensure your services remain available even during high traffic periods. While the standard version of HAProxy is [&hellip;]","og_url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/","article_modified_time":"2024-11-25T06:39:29+00:00","og_image":[{"url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-536.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/","url":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/","name":"How to Install and Configure HAProxy for Load Balancing on Almalinux -","isPartOf":{"@id":"https:\/\/www.truehost.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/#primaryimage"},"image":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/#primaryimage"},"thumbnailUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-536.png","datePublished":"2024-11-22T08:56:42+00:00","dateModified":"2024-11-25T06:39:29+00:00","breadcrumb":{"@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/#primaryimage","url":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-536.png","contentUrl":"https:\/\/truehost.com\/support\/wp-content\/uploads\/2024\/11\/image-536.png"},{"@type":"BreadcrumbList","@id":"https:\/\/truehost.com\/support\/knowledge-base\/how-to-install-and-configure-haproxy-for-load-balancing-on-almalinux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.truehost.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Install and Configure HAProxy for Load Balancing on Almalinux"}]},{"@type":"WebSite","@id":"https:\/\/www.truehost.com\/support\/#website","url":"https:\/\/www.truehost.com\/support\/","name":"","description":"Help In a Click","publisher":{"@id":"https:\/\/www.truehost.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.truehost.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.truehost.com\/support\/#organization","name":"Truehost Kenya","url":"https:\/\/www.truehost.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.truehost.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","contentUrl":"https:\/\/www.truehost.com\/support\/wp-content\/uploads\/2026\/04\/cropped-image_2026-04-16_174808866.png","width":240,"height":48,"caption":"Truehost Kenya"},"image":{"@id":"https:\/\/www.truehost.com\/support\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/docs\/17618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/comments?post=17618"}],"version-history":[{"count":9,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/docs\/17618\/revisions"}],"predecessor-version":[{"id":17658,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/docs\/17618\/revisions\/17658"}],"wp:attachment":[{"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/media?parent=17618"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/doc_category?post=17618"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.truehost.com\/support\/wp-json\/wp\/v2\/doc_tag?post=17618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}