Difference between revisions of "Haproxy"

From belajarwiki
Jump to navigation Jump to search
(Created page with "https://www.haproxy.org/ Cara install haproxy di ubuntu 20.04.01 untuk load balancing apt get update apt get install haproxy cp /etc/haproxy/haproxy.cfg /etc/haprox...")
 
 
Line 30: Line 30:
 
   
 
   
  
NOTE : apache dimatikan (port 80 harus kosong.)
+
NOTE : port 80 harus kosong

Latest revision as of 14:34, 21 November 2020

https://www.haproxy.org/

Cara install haproxy di ubuntu 20.04.01 untuk load balancing

  apt get update
  apt get install haproxy
  cp /etc/haproxy/haproxy.cfg /etc/haproxy/haproxy_asli.cfg

Buka konfigurasi haproxy

  vi /etc/haproxy/haproxy.cfg

Tambahkan pada baris akhir

  frontend http_front
     bind *:80
     stats uri /haproxy?stats
     default_backend http_back
  backend http_back
     balance roundrobin   #pilih jenis algoritma
     #pilih server yang akan dibuat load balancing
     server wbs1.com 192.168.8.104:80 check   
     server wbs2.com 192.168.8.105:80 check

Restart service haproxy

  systemctl restart haproxy


NOTE : port 80 harus kosong