global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats timeout 30s
stats auth admin:admin
user haproxy
group haproxy
daemon
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
frontend http_frontend
bind *:80
mode http
redirect scheme https code 301 if !{ ssl_fc }
frontend https_frontend
bind *:443 ssl crt /home/haproxy/Desktop/cert.pem
mode http
default_backend haproxy
backend haproxy
mode https
balance roundrobin
option forwardfor
server web1 192.168.50.3:443 check ssl verify none
server web2 192.168.60.3:443 check ssl verify none
listen stats
bind :8080
mode http
stats enable
stats uri /stats
stats realm HAProxy Statistics
frontend http_frontend
bind *:80
mode http
redirect scheme https code 301 if !{ ssl_fc }
frontend https_frontend
bind *:443 ssl crt /home/haproxy/Desktop/cert.pem
mode http
default_backend haproxy
backend haproxy
mode https
balance roundrobin
option forwardfor
server web1 192.168.50.3:443 check ssl verify none
server web2 192.168.60.3:443 check ssl verify none
listen stats
bind :8080
mode http
stats enable
stats uri /stats
stats realm HAProxy Statistics
radioryze is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.