good for manual configured proxy, reverse proxy, load balancer
need to configure a front end
then backend to redirect traffic to different nodes
https://www.youtube.com/watch?v=9GWziEBoDqQ&t=328s
https://www.haproxy.org/
https://serverfault.com/questions/788132/how-to-configure-haproxy-as-a-reverse-proxy
frontend localhost
mode http
use_backend web1 if { hdr(host) -i abc.com }
use_backend web1 if { hdr(host) -i def.com }
use_backend web2 if { hdr(host) -i cba.com }
use_backend web2 if { hdr(host) -i fed.com }
backend web1
server web1 web1.foo.com
backend web2
server web2 web2.foo.com
No comments:
Post a Comment