Skip to content

Commit

Permalink
task 1 solved
Browse files Browse the repository at this point in the history
Install your load balancer
  • Loading branch information
the1Riddle authored Dec 10, 2023
2 parents da5c20b + af280d2 commit 3d32d12
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions 0x0F-load_balancer/1-install_load_balancer
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# Install and configure HAproxy on your lb-01 server.

ufw allow 1344
sudo apt-get -y update
sudo apt-get install -y haproxy

print %s "
frontend proxynode
bind *:80
mode http
default_backend web-backend
backend web-backend
balance roundrobin
option forwadfor
server 338390-web-01 54.88.12.218:80 check
server 338390-web-02 100.25.222.24:80 check
" >> /etc/haproxy/haproxy.cfg

sudo service haproxy restart

0 comments on commit 3d32d12

Please sign in to comment.