Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install your load balancer #9

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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