95 lines
2.3 KiB
Caddyfile
Executable File
95 lines
2.3 KiB
Caddyfile
Executable File
# --------------------------------------------------
|
|
# global options
|
|
# --------------------------------------------------
|
|
{
|
|
acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
|
|
|
|
admin :2019
|
|
log {
|
|
output file /var/log/caddy/caddy.log
|
|
level info
|
|
}
|
|
|
|
servers {
|
|
trusted_proxies static private_ranges
|
|
}
|
|
|
|
crowdsec {
|
|
api_url http://crowdsec:8080
|
|
api_key {$CROWDSEC_API_KEY}
|
|
}
|
|
}
|
|
|
|
# --------------------------------------------------
|
|
# cloudflare tls snippet for sites
|
|
# --------------------------------------------------
|
|
|
|
(cloudflare) {
|
|
tls {
|
|
dns cloudflare BI5kO2I9fHAqso_OClKxbUM6xTCodH2OfQ60yNp3
|
|
resolvers 1.1.1.1 1.0.0.1
|
|
}
|
|
}
|
|
|
|
# --------------------------------------------------
|
|
# auth snippet for authentik
|
|
# --------------------------------------------------
|
|
|
|
(auth) {
|
|
reverse_proxy /outpost.goauthentik.io/* authentik-server:9000
|
|
|
|
forward_auth authentik-server:9000 {
|
|
uri /outpost.goauthentik.io/auth/caddy
|
|
copy_headers X-Authentik-Username X-Authentik-Groups X-Authentik-Entitlements X-Authentik-Email X-Authentik-Name X-Authentik-Uid X-Authentik-Jwt X-Authentik-Meta-Jwks X-Authentik-Meta-Outpost X-Authentik-Meta-Provider X-Authentik-Meta-App X-Authentik-Meta-Version
|
|
}
|
|
}
|
|
|
|
# --------------------------------------------------
|
|
# akanealw.com root domain
|
|
# --------------------------------------------------
|
|
|
|
akanealw.com {
|
|
import cloudflare
|
|
@akanealwcom host akanealw.com
|
|
handle @akanealwcom {
|
|
import auth
|
|
reverse_proxy 192.168.1.4:3005
|
|
}
|
|
}
|
|
|
|
# --------------------------------------------------
|
|
# authentik subdomain
|
|
# --------------------------------------------------
|
|
|
|
authentik.akanealw.com {
|
|
import cloudflare
|
|
reverse_proxy authentik-server:9091
|
|
}
|
|
|
|
# --------------------------------------------------
|
|
# *.akanealw.com subdomains
|
|
# --------------------------------------------------
|
|
|
|
import *.caddy
|
|
|
|
# --------------------------------------------------
|
|
# aknlw.com root domain
|
|
# --------------------------------------------------
|
|
|
|
aknlw.com {
|
|
import cloudflare
|
|
@shlink host aknlw.com
|
|
handle @shlink {
|
|
reverse_proxy 192.168.1.30:8380
|
|
}
|
|
}
|
|
|
|
# --------------------------------------------------
|
|
# *.aknlw.com subdomains
|
|
# --------------------------------------------------
|
|
|
|
repo.aknlw.com {
|
|
import cloudflare
|
|
reverse_proxy 192.168.1.50:3000
|
|
}
|