Skip to content

Instantly share code, notes, and snippets.

@niktwenty3
Created November 15, 2018 13:25
Show Gist options
  • Save niktwenty3/be8ac490e45b7232226a4a4e8c063ca2 to your computer and use it in GitHub Desktop.
Save niktwenty3/be8ac490e45b7232226a4a4e8c063ca2 to your computer and use it in GitHub Desktop.
Let's Encrypt HAProxy Example Configuration
global
log /dev/log local0 debug
nbproc 1
daemon
lua-load config.lua
lua-load acme.lua
defaults
log global
mode http
option httplog
timeout connect 5s
timeout client 10s
timeout server 10s
listen http
bind \*:80
http-request use-service lua.acme if { path_beg /.well-known/acme-challenge/ }
userlist acme_users
user acme password $5$Tmx0ttbvZB1TsL$QDbECr8B.rPvB9LWmSypDuVYwJJtReWrh.HWpmZNMaA
listen acme
bind 127.0.0.1:9011
acl acme_auth http_auth(acme_users)
http-request auth realm "HAProxy ACME auth" if !acme_auth
http-request use-service lua.acme
listen acme-ca
bind 127.0.0.1:9012
server ca acme-v02.api.letsencrypt.org:443 ssl verify required ca-file letsencrypt-x3-ca-chain.pem
http-request set-header Host acme-v02.api.letsencrypt.org
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment