Skip to content

Instantly share code, notes, and snippets.

@vatro
Forked from laszlocph/haproxy.cfg
Last active November 25, 2024 09:15
Show Gist options
  • Select an option

  • Save vatro/79439327009d58e25166d00aa1afabc5 to your computer and use it in GitHub Desktop.

Select an option

Save vatro/79439327009d58e25166d00aa1afabc5 to your computer and use it in GitHub Desktop.
global
daemon
user haproxy
group haproxy
log /dev/log local0
maxconn 10000
pidfile /var/run/haproxy.pid
defaults
log global
mode tcp
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout check 10s
frontend nodeport80
bind :80
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
use_backend letsencrypt-backend if letsencrypt-acl
default_backend port32080
backend letsencrypt-backend
server letsencrypt 127.0.0.1:32001 # Fixed NodePort for cert-manager
frontend nodeport443
bind :443
default_backend port32443
backend port32080
balance roundrobin
server web1 127.0.0.1:32080
backend port32443
balance roundrobin
server web1 127.0.0.1:32443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment