/haproxy_tcp.cfg Secret
Last active
December 7, 2021 16:55
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# customizes system-wide settings | |
global | |
# specifies maximum number of connections | |
maxconn 100000 | |
# starts haproxy as a background service | |
daemon | |
# customizes frontend and backend settings | |
defaults | |
# specifies to terminate conenctions after specified inactivity | |
timeout server 30s | |
timeout client 30s | |
timeout connect 3s | |
# customizes how to handle insecure connections | |
frontend http_requests | |
# specifies port | |
bind *:80 | |
# specifies protocol | |
mode tcp | |
# sends insecure connections to backend web servers for insecure connections | |
default_backend web_servers_insecure | |
# distributes insecure connections between specified web servers | |
backend web_servers_insecure | |
# specifies protocol | |
mode tcp | |
# specifies algorithm to select web server | |
balance roundrobin | |
# sets ip address and port of web servers | |
server server-1 173.255.209.233:80 check | |
server server-2 45.33.13.41:80 check | |
# customizes how to handle secure connections | |
frontend https_requests | |
# specifies port | |
bind *:443 | |
# specifies protocol | |
mode tcp | |
# sends secure connections to backend web servers for secure connections | |
default_backend web_servers_secure | |
# distributes secure connections between specified web servers | |
backend web_servers_secure | |
# specifies protocol | |
mode tcp | |
# specifies algorithm to select web server | |
balance roundrobin | |
# sets ip address and port of web servers | |
server server-1 173.255.209.233:443 check | |
server server-2 45.33.13.41:443 check | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment