leon / ssl-haproxy.md
Created at Tue Apr 28 23:43:53 WIB 2020
An example for implementation HAProxy with SSL
ssl-haproxy.md
Raw
frontend http
  bind *:80
  bind *:443 ssl crt /etc/haproxy/cert.pem
  redirect scheme https code 301 if !{ ssl_fc }
  reqadd X-Forwarded-Proto:\ http
  reqadd X-Forwarded-Proto:\ https
  mode http
  errorfile 503 /etc/haproxy/50x.http
  default_backend web-backend

backend web-backend
   balance roundrobin
   server web1 117.53.44.123:8080 check