![]() Option httpchk HEAD / HTTP/1.1rnHost:localhost Http-request add-header X-Forwarded-Proto https if Http-request set-header X-Forwarded-Port % Next, add your web servers IP as shown below: backend Web_Servers You can achieve this by editing a file /etc/haproxy/haproxy.cfg: nano /etc/haproxy/haproxy.cfgĪdd your HAProxy server IP address and port 80 as shown below: frontend Local_Server Now we set up HAProxy Load Balancer on Debian 10 for load balancing. You can also check the HAProxy service using the following command: sudo systemctl start haproxy Once done, run the following commands to install it:Ĭheck the version of HAProxy with the following command: haproxy -v Next, add HAProxy repository to apt: echo deb buster-backports-2.2 main | sudo tee /etc/apt//haproxy.list Now download the GPG key for HAProxy with the following command: curl | sudo apt-key add. ![]() So you will need to add the repository for that. Before running the tutorial below, it’s important to make sure your system is up to date by running the following apt commands in the terminal: sudo apt updateīy default, the HAProxy package is not available in the Debian 10 default repository. Server 2: 192.168.0.11 HAProxy Server: HAProxy: haproxy 192.168.0.8 Install HAProxy on Debian 10 Buster There are 2 web servers running with Apache2 and listening on port 80 and one HAProxy server: Web Server Details: Server 1: 192.168.0.10 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |