Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4718

Haproxy v 1.8 config

$
0
0

@Harery wrote:

I’m using round-robin balance type with back-end three web servers
but all incoming connection always forwards to web-01 not balancing with 3 web servers
PS* when closing web-01 all connection going to web-02

here’s my config file i need to balance all traffic with back-end server not only one server

global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy

	pidfile /var/run/haproxy.pid
	maxconn 50000
	user haproxy
	group haproxy
	daemon

	stats socket /var/lib/haproxy/stats mode 600 level admin
	stats timeout 30s
	
	ca-base /etc/opt/rh/rh-haproxy18/haproxy/ssl/live/yasso.com
	crt-base /etc/opt/rh/rh-haproxy18/haproxy/ssl/live/yasso.com/
	
	tune.ssl.default-dh-param 4096
   	ssl-default-bind-options ssl-min-ver TLSv1.2 no-tls-tickets 
	ssl-default-bind-ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384

defaults
	mode http 
	log	global
	timeout connect 25000ms 
	timeout client 60000ms 
	timeout server 60000ms
	timeout queue 60000ms
	timeout http-request 15000ms
	timeout http-keep-alive 15000ms
	option	httplog
	option	dontlognull
	option redispatch
	option forwardfor 
	option http-server-close
	option httpclose

frontend https-in

	rspadd X-Frame-Options:\ DENY
	bind *:443 ssl crt /etc/opt/rh/rh-haproxy18/haproxy/ssl/live/yasso.com/yasso.com.pem

	stats enable  
	stats realm Haproxy\ Statistics  
	stats uri /haproxy_stats 
	stats refresh 10s
	stats show-node
	stats auth yasso:yasso
	stats admin if TRUE	

	default_backend WEB-APP
	
backend WEB-APP

	balance roundrobin
	option http-keep-alive
	option httpchk HEAD / HTTP/1.1\r\nHost:localhost
	cookie SERVERID insert indirect nocache
	stick-table type integer size 1k expire 3h
	stick on dst_port
	
    	server web-01 192.168.100.78:80 check cookie web-01
    	server web-02 192.168.100.79:80 check cookie web-02
    	server web-03 192.168.100.80:80 check cookie web-03

	timeout tunnel 10h

	http-request set-header X-Forwarded-Port %[dst_port]
	http-request add-header X-Forwarded-Proto https if { ssl_fc }

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4718

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>