#/etc/haproxy/haproxy.cfg # --------------------------------------------------------------------------- #
# Global
# --------------------------------------------------------------------------- #
global
log 127.0.0.1 local0 info
# --------------------------------------------------------------------------- #
# Defaults Timeouts
# --------------------------------------------------------------------------- #
defaults
retries 3
option redispatch
timeout client 30s
timeout connect 4s
timeout server 30s
# --------------------------------------------------------------------------- #
# Stats
# --------------------------------------------------------------------------- #
listen stats
bind bind *:8081
mode mode http
log log global
maxconn maxconn 10
stats stats enable
stats stats hide-version
stats stats refresh 30s
stats stats show-node
stats stats auth admin:password
stats stats uri /status
# --------------------------------------------------------------------------- #
# FTP - mft Servers
# --------------------------------------------------------------------------- #
frontend ftp_service_front
bind bind vip:4000-4010 transparent
mode mode tcp
use use_backend ftp_service_backend
backend ftp_service_backend
mode mode tcp
stick stick-table type ip size 10k expire 300s
stick stick on src
server server gw0 <SERVERNAME> check port <SERVERPORT>
# --------------------------------------------------------------------------- #
# SFTP - mft Servers
# --------------------------------------------------------------------------- #
frontend sftp_service_front
bind bind vip:3000-3010 transparent
mode mode tcp
use use_backend sftp_service_backend
backend sftp_service_backend
mode mode tcp
stick stick-table type ip size 10k expire 300s
stick stick on src
server server gw0 <SERVERNAME> check port <SERVERPORT>
# --------------------------------------------------------------------------- #
# UDMG Server
# --------------------------------------------------------------------------- #
frontend gw_service_front
bind bind vip:8080 transparent
mode mode http
default default_backend gw_service_backend
backend gw_service_backend
mode mode http
balance balance roundrobin
cookie cookie SRVNAME insert
server server gw0 <SERVERNAME> check port <SERVERPORT> cookie S01 check
# --------------------------------------------------------------------------- #
# Nginx
# --------------------------------------------------------------------------- #
frontend nx_service_front
bind bind vip:80 transparent
mode mode http
default default_backend nx_service_backend
backend nx_service_backend
mode mode http
balance balance roundrobin
cookie cookie SRVNAME insert
server server gw0 <SERVERNAME> check port 80 cookie S01 check
# --------------------------------------------------------------------------- #
# END
# --------------------------------------------------------------------------- #
# EOF
|