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
#/usr/bin/bash | |
DNS_DOMAIN=${1:-'pages.my.cloud'} | |
MAPFILE=${2:-'/etc/haproxy/map/buckets.map'} | |
RELOAD=0 | |
map() { | |
MAP="${1} $(echo $2 | tr '/' ':')" | |
if ! grep -Fqx "${MAP}" "${MAPFILE}" ; then |
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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon | |
lua-load /etc/haproxy/cors.lua |
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
# Assumptions: easyrsa3 available in current dir, and functional openssl. | |
# This basic example puts the "offline" and "sub" PKI dirs on the same system. | |
# A real-world setup would use different systems and transport the public components. | |
# Build root CA: | |
EASYRSA_PKI=offline ./easyrsa init-pki | |
EASYRSA_PKI=offline ./easyrsa build-ca nopass | |
# Build sub-CA request: | |
EASYRSA_PKI=sub ./easyrsa init-pki |