#/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 *:8081
mode http
log global
maxconn 10
stats enable
stats hide-version
stats refresh 30s
stats show-node
stats auth admin:password
stats uri /status
# --------------------------------------------------------------------------- #
# FTP - mft Servers
# --------------------------------------------------------------------------- #
frontend ftp_service_front
bind vip:40003000-4010 3010 transparent
mode tcp
use_backend ftp_service_backend
backend ftp_service_backend
mode tcp
stick-table type ip size 10k expire 300s
stick on src
server gw0 <SERVERNAME> check port <SERVERPORT>
# --------------------------------------------------------------------------- #
# SFTP - mft Servers
# --------------------------------------------------------------------------- #
frontend sftp_service_front
bind vip:30004000-3010 4010 transparent
mode tcp
use_backend sftp_service_backend
backend sftp_service_backend
mode tcp
stick-table type ip size 10k expire 300s
stick on src
server gw0 <SERVERNAME> check port <SERVERPORT>
# --------------------------------------------------------------------------- #
# UDMG Server
# --------------------------------------------------------------------------- #
frontend gw_service_front
bind vip:18080 transparent
mode http
default_backend gw_service_backend
backend gw_service_backend
mode http
balance roundrobin
cookie SRVNAME insert
server gw0 <SERVERNAME> check port <SERVERPORT> cookie S01 check
# --------------------------------------------------------------------------- #
# Nginx
# --------------------------------------------------------------------------- #
frontend nx_service_front
bind vip:80 transparent
mode http
default_backend nx_service_backend
backend nx_service_backend
mode http
balance roundrobin
cookie SRVNAME insert
server gw0 <SERVERNAME> check port 80 cookie S01 check
# --------------------------------------------------------------------------- #
# END
# --------------------------------------------------------------------------- #
# EOF
|