{"id":1629,"date":"2022-01-30T12:30:00","date_gmt":"2022-01-30T18:30:00","guid":{"rendered":"https:\/\/linuxhostsupport.com\/blog\/?p=1629"},"modified":"2022-03-28T17:24:33","modified_gmt":"2022-03-28T22:24:33","slug":"how-to-install-and-configure-haproxy-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/","title":{"rendered":"How to Install and Configure HAProxy on Ubuntu 20.04"},"content":{"rendered":"\n<div id=\"linux-2076426326\" class=\"linux-before-1st-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1339&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340090_NVMeGoogleAds_728x90_041322-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div><p>HAProxy or High Availability Proxy, is a well-known open-source TCP\/HTTP load balancer and proxy solution which is able to handle a lot of traffic. HAProxy consumes a very low amount of memory, and it is commonly used to improve the performance of servers by distributing the workload across multiple servers to handle a large number of concurrent connections. If you have busy websites, you can install and configure HAProxy as the reverse proxy to your webservers.<\/p>\n\n\n\n<p>In this tutorial, we will show you how to install and configure HAProxy on Ubuntu 20.04, one of the most popular operating systems in the world.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>3 Ubuntu 20.04 VPS, one for HAProxy and we will use the other two as the webservers.<\/li><li>SSH root access or a normal SSH user with sudo privileges.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1. Login and Update the System<\/h2>\n\n\n\n<p>Log in to your Ubuntu 20.04 VPS as a root user or as a regular user with sudo privileges. In this tutorial, we will use a sudoer user called \u2018master\u2019.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">ssh master@IP_Address -p Port_number<\/pre>\n\n\n\n<p>Do not forget to replace \u201cmaster\u201d with a user that has sudo privileges, or root. Additionally, replace \u201cIP_Address\u201d and \u201cPort_Number\u201d with your server\u2019s IP address and SSH port.<\/p>\n\n\n\n<p>Run this command to check whether you have the proper Ubuntu version installed on your server:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ lsb_release -a<\/pre>\n\n\n\n<p>You should see this output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">No LSB modules are available.<br>Distributor ID: Ubuntu<br>Description: Ubuntu 20.04.3 LTS<br>Release: 20.04<br>Codename: focal<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"488\" height=\"107\" src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/install-and-configure-haproxy-on-ubuntu-20.04.png\" alt=\"install and configure haproxy on ubuntu 20.04\" class=\"wp-image-1630\" srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/install-and-configure-haproxy-on-ubuntu-20.04.png 488w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/install-and-configure-haproxy-on-ubuntu-20.04-300x66.png 300w\" sizes=\"(max-width: 488px) 100vw, 488px\" \/><\/figure>\n\n\n\n<p>Now, run the following command to update all installed packages to the latest available version.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt update &amp;&amp; sudo apt upgrade<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2. Install HAProxy<\/h2>\n\n\n\n<p>HAProxy is available on the default Ubuntu 20.04 repository. However, the available package is not the most recent stable version. Let\u2019s check the HAProxy version if we want to install it from Ubuntu 20.04 repository.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt show haproxy<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"306\" src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/set-up-and-configure-haproxy-on-ubuntu-20.04.png\" alt=\"set up and configure haproxy on ubuntu 20.04\" class=\"wp-image-1631\" srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/set-up-and-configure-haproxy-on-ubuntu-20.04.png 1024w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/set-up-and-configure-haproxy-on-ubuntu-20.04-300x90.png 300w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/set-up-and-configure-haproxy-on-ubuntu-20.04-768x230.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You can check the latest stable version at http:\/\/www.haproxy.org\/#down. In this article, we are going to install HAPproxy 2.5, let\u2019s run the following command to proceed with the installation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt install software-properties-common<\/pre>\n\n\n\n<p><br>The software-properties-common package is probably already installed on your server, but there will be no issue if you run this command again.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo add-apt-repository ppa:vbernat\/haproxy-2.5<\/pre>\n\n\n\n<p>This command puts the Personal Package Archive (PPA) into the list of apt sources. After adding the PPA to our APT source list, we can run the command below to complete the installation. You can replace the version number in the command above if you want to use another version of HAProxy.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt update\n$ sudo apt install haproxy<\/pre>\n\n\n\n<p>Once installed, we can check the version by running this command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo haproxy -v<\/pre>\n\n\n\n<p>You should see this output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">HAProxy version 2.5.0-1ppa1~focal 2021\/11\/26 - https:\/\/haproxy.org\/<br>Status: stable branch - will stop receiving fixes around Q1 2023.<br>Known bugs: http:\/\/www.haproxy.org\/bugs\/bugs-2.5.0.html<br>Running on: Linux 5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"705\" height=\"84\" src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/setting-up-and-configuring-haproxy-on-ubuntu-20.04.png\" alt=\"setting up and configuring haproxy on ubuntu 20.04\" class=\"wp-image-1632\" srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/setting-up-and-configuring-haproxy-on-ubuntu-20.04.png 705w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/setting-up-and-configuring-haproxy-on-ubuntu-20.04-300x36.png 300w\" sizes=\"(max-width: 705px) 100vw, 705px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3. Configure HAProxy<\/h2>\n\n\n\n<p>By default, HAProxy is not configured to listen on a port number. In this step, since we are going to configure it as a reverse proxy and load balancer, we are going to make changes to the default HAProxy configuration.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo cp -a \/etc\/haproxy\/haproxy.cfg{,.orig}<\/pre>\n\n\n\n<p>The command above will copy the file <code>\/etc\/haproxy\/haproxy.cfg<\/code> to <code>\/etc\/haproxy\/haproxy.cfg.orig<\/code><\/p>\n\n\n\n<p>Now. let\u2019s edit the file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/haproxy\/haproxy.cfg<\/pre>\n\n\n\n<p>And append these lines:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">frontend haproxy-main\n    bind *:80\n    option forwardfor  \n    default_backend apache_webservers    \n\nbackend apache_webservers\n    balance roundrobin\n    server websvr1\t10.0.0.10:80 check\n    server websvr2\t10.0.0.20:80 check<\/pre>\n\n\n\n<p>Make sure to replace 10.0.0.10 and 10.0.0.20 with your actual webserver IP addresses. Save the file then exit.<\/p>\n\n\n\n<p>Now, log in to your other two servers and install apache on the servers then create a default index file by running these commands.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo apt update; sudo apt install apache2 -y<\/pre>\n\n\n\n<p>On <strong>websvr1<\/strong>, run this command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo \"&lt;H1&gt;Apache on backend server 1 is running &lt;\/H1&gt;\" |sudo tee \/var\/www\/html\/index.html<\/pre>\n\n\n\n<p>On <strong>websvr2<\/strong>, run this command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">echo \"&lt;H1&gt;Apache on backend server 2 is running &lt;\/H1&gt;\" |sudo tee \/var\/www\/html\/index.html<\/pre>\n\n\n\n<p id=\"h-save-the-files-then-exit\">Save the files then exit.<\/p>\n\n\n\n<p>On your HAProxy server, restart the service:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl restart haproxy<\/pre>\n\n\n\n<p>The HAProxy server is now ready to accept and distribute the workload across the two apache servers. You can verify this by invoking a one-liner command in your HAProxy server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ while true; do curl localhost; sleep 1; done<\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"517\" height=\"347\" src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/configure-haproxy-on-ubuntu-20.04.png\" alt=\"configure haproxy on ubuntu 20.04\" class=\"wp-image-1633\" srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/configure-haproxy-on-ubuntu-20.04.png 517w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/configure-haproxy-on-ubuntu-20.04-300x201.png 300w\" sizes=\"(max-width: 517px) 100vw, 517px\" \/><\/figure>\n\n\n\n<p>As seen in the picture, the website is loaded both from websvr1 and websvr2.<\/p>\n\n\n\n<p>If you want to see the statistics and see the information through the GUI, we can configure HAProxy and enable the monitoring function.<\/p>\n\n\n\n<p>Open HAProxy configuration file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo nano \/etc\/haproxy\/haproxy.cfg<\/pre>\n\n\n\n<p>Then append these lines.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">listen stats\n    bind :8800\n    stats enable\n    stats uri \/\n    stats hide-version\n    stats auth rosehosting:m0d1fyth15\n    default_backend apache_webservers<\/pre>\n\n\n\n<p>Pay attention to the <code>stats auth<\/code> part. This is where you specify the login name and password. Change the login name and password to a stronger password. Save the file, exit and restart HAProxy.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">$ sudo systemctl restart haproxy<\/pre>\n\n\n\n<p>Now, you can navigate to <code>http:\/\/YOUR_HAPROXY_IP_ADDRESS:8800<\/code> to see the statistics, you will be asked for the username and password you specified earlier in <code>\/etc\/haproxy\/haproxy.cfg<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1024\" height=\"423\" src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/installing-and-configuring-haproxy-on-ubuntu-20.04.png\" alt=\"installing and configuring haproxy on ubuntu 20.04\" class=\"wp-image-1634\" srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/installing-and-configuring-haproxy-on-ubuntu-20.04.png 1024w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/installing-and-configuring-haproxy-on-ubuntu-20.04-300x124.png 300w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/installing-and-configuring-haproxy-on-ubuntu-20.04-768x317.png 768w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>That\u2019s it. You have successfully installed HAProxy on your <a href=\"https:\/\/www.rosehosting.com\/ubuntu-hosting.html\" target=\"_blank\" rel=\"noreferrer noopener\">Ubuntu VPS<\/a>. For more information about HAProxy, please refer to the HAProxy website.<\/p>\n\n\n\n<p>If you are one of our web hosting customers and use our optimized Linux Hosting, you don\u2019t have to install HAProxy On Ubuntu 20.04 by yourself, our expert Linux admins will set up and configure HAProxy on your Ubuntu VPS, for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n\n\n\n<p>PS. If you liked this post, on how to install HAProxy on Ubuntu 20.04, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p><div id=\"linux-2810931461\" class=\"linux-after-8th-paragraph linux-entity-placement\" style=\"margin-top: 15px;margin-bottom: 15px;\"><a href=\"https:\/\/www.rosehosting.com\/managed-vps-hosting\/?mtm_campaign=blogs&#038;mtm_source=lhs&#038;mtm_medium=blog&#038;mtm_content=managed-vps&#038;mtm_cid=1340&#038;mtm_placement=inline\" aria-label=\"Untitled\"><img src=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg\" alt=\"\"  srcset=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622.jpg 728w, https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2020\/12\/1340095_VPSGoogleAds_728x90_042622-300x37.jpg 300w\" sizes=\"(max-width: 728px) 100vw, 728px\" width=\"728\" height=\"90\"  style=\"display: inline-block;\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>HAProxy or High Availability Proxy, is a well-known open-source TCP\/HTTP load balancer and proxy solution which is able to handle a lot of traffic. HAProxy consumes a very low amount of memory, and it is commonly used to improve the performance of servers by distributing the workload across multiple servers to handle a large number [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1638,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,182],"tags":[207,214,199,174],"class_list":["post-1629","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","category-ubuntu","tag-configure","tag-haproxy","tag-how-to-install","tag-ubuntu-20-04"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>LHS: How to Install and Configure HAProxy on Ubuntu 20.04<\/title>\n<meta name=\"description\" content=\"In this detailed tutorial, users will learn how to install and configure HaProxy on Ubuntu 20.04.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/\" \/>\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 on Ubuntu 20.04\" \/>\n<meta property=\"og:description\" content=\"In this detailed tutorial, users will learn how to install and configure HaProxy on Ubuntu 20.04.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxHostSupport\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/linuxhostsupport\" \/>\n<meta property=\"article:published_time\" content=\"2022-01-30T18:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-28T22:24:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/how-to-install-and-configure-haproxy-on-ubuntu-20.04.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Install and Configure HAProxy on Ubuntu 20.04\" \/>\n<meta name=\"twitter:description\" content=\"In this detailed tutorial, users will learn how to install and configure HaProxy on Ubuntu 20.04.\" \/>\n<meta name=\"twitter:creator\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:site\" content=\"@lnxhostsupport\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\"},\"headline\":\"How to Install and Configure HAProxy on Ubuntu 20.04\",\"datePublished\":\"2022-01-30T18:30:00+00:00\",\"dateModified\":\"2022-03-28T22:24:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/\"},\"wordCount\":763,\"commentCount\":2,\"image\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/how-to-install-and-configure-haproxy-on-ubuntu-20.04.jpg\",\"keywords\":[\"configure\",\"haproxy\",\"how to install\",\"ubuntu 20.04\"],\"articleSection\":[\"Tutorials\",\"Ubuntu\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/\",\"name\":\"LHS: How to Install and Configure HAProxy on Ubuntu 20.04\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/how-to-install-and-configure-haproxy-on-ubuntu-20.04.jpg\",\"datePublished\":\"2022-01-30T18:30:00+00:00\",\"dateModified\":\"2022-03-28T22:24:33+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\"},\"description\":\"In this detailed tutorial, users will learn how to install and configure HaProxy on Ubuntu 20.04.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/how-to-install-and-configure-haproxy-on-ubuntu-20.04.jpg\",\"contentUrl\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/12\\\/how-to-install-and-configure-haproxy-on-ubuntu-20.04.jpg\",\"width\":742,\"height\":372,\"caption\":\"how to install and configure haproxy on ubuntu 20.04\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install and Configure HAProxy on Ubuntu 20.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/\",\"name\":\"LinuxHostSupport\",\"description\":\"Linux Tutorials and Guides\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/#\\\/schema\\\/person\\\/53a9571ea078cdf350137a1e97423cfb\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"url\":\"https:\\\/\\\/linuxhostsupport.com\\\/blog\\\/author\\\/r0s3admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"LHS: How to Install and Configure HAProxy on Ubuntu 20.04","description":"In this detailed tutorial, users will learn how to install and configure HaProxy on Ubuntu 20.04.","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:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/","og_locale":"en_US","og_type":"article","og_title":"How to Install and Configure HAProxy on Ubuntu 20.04","og_description":"In this detailed tutorial, users will learn how to install and configure HaProxy on Ubuntu 20.04.","og_url":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/","og_site_name":"LinuxHostSupport","article_publisher":"https:\/\/www.facebook.com\/linuxhostsupport","article_published_time":"2022-01-30T18:30:00+00:00","article_modified_time":"2022-03-28T22:24:33+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/how-to-install-and-configure-haproxy-on-ubuntu-20.04.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_title":"How to Install and Configure HAProxy on Ubuntu 20.04","twitter_description":"In this detailed tutorial, users will learn how to install and configure HaProxy on Ubuntu 20.04.","twitter_creator":"@lnxhostsupport","twitter_site":"@lnxhostsupport","twitter_misc":{"Written by":"admin","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/#article","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/"},"author":{"name":"admin","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"headline":"How to Install and Configure HAProxy on Ubuntu 20.04","datePublished":"2022-01-30T18:30:00+00:00","dateModified":"2022-03-28T22:24:33+00:00","mainEntityOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/"},"wordCount":763,"commentCount":2,"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/how-to-install-and-configure-haproxy-on-ubuntu-20.04.jpg","keywords":["configure","haproxy","how to install","ubuntu 20.04"],"articleSection":["Tutorials","Ubuntu"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/","url":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/","name":"LHS: How to Install and Configure HAProxy on Ubuntu 20.04","isPartOf":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/#primaryimage"},"image":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/how-to-install-and-configure-haproxy-on-ubuntu-20.04.jpg","datePublished":"2022-01-30T18:30:00+00:00","dateModified":"2022-03-28T22:24:33+00:00","author":{"@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb"},"description":"In this detailed tutorial, users will learn how to install and configure HaProxy on Ubuntu 20.04.","breadcrumb":{"@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/#primaryimage","url":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/how-to-install-and-configure-haproxy-on-ubuntu-20.04.jpg","contentUrl":"https:\/\/linuxhostsupport.com\/blog\/wp-content\/uploads\/2021\/12\/how-to-install-and-configure-haproxy-on-ubuntu-20.04.jpg","width":742,"height":372,"caption":"how to install and configure haproxy on ubuntu 20.04"},{"@type":"BreadcrumbList","@id":"https:\/\/linuxhostsupport.com\/blog\/how-to-install-and-configure-haproxy-on-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linuxhostsupport.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install and Configure HAProxy on Ubuntu 20.04"}]},{"@type":"WebSite","@id":"https:\/\/linuxhostsupport.com\/blog\/#website","url":"https:\/\/linuxhostsupport.com\/blog\/","name":"LinuxHostSupport","description":"Linux Tutorials and Guides","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linuxhostsupport.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/linuxhostsupport.com\/blog\/#\/schema\/person\/53a9571ea078cdf350137a1e97423cfb","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed83c63a34114218f977e1f913be03906d17c7d9c800788fcac345f5edaf6cfa?s=96&d=mm&r=g","caption":"admin"},"url":"https:\/\/linuxhostsupport.com\/blog\/author\/r0s3admin\/"}]}},"_links":{"self":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/comments?post=1629"}],"version-history":[{"count":3,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1629\/revisions"}],"predecessor-version":[{"id":1667,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/posts\/1629\/revisions\/1667"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media\/1638"}],"wp:attachment":[{"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/media?parent=1629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/categories?post=1629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxhostsupport.com\/blog\/wp-json\/wp\/v2\/tags?post=1629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}