Skip to content

Instantly share code, notes, and snippets.

@atta
atta / cron.sh
Created September 7, 2022 13:04
cron for custom domains
#/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
@atta
atta / haproxy.cfg
Created September 7, 2022 09:37
HAProxy allow custom domains for ceph RadosGW with keystone rewrite S3 dns-style to path-style
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
@atta
atta / setup.sh
Created December 2, 2020 19:48 — forked from QueuingKoala/setup.sh
Sub-CA example
# 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