diff --git a/caddy/Caddyfile b/caddy/Caddyfile new file mode 100644 index 0000000..53b5aa8 --- /dev/null +++ b/caddy/Caddyfile @@ -0,0 +1,75 @@ +{ + acme_ca https://acme-staging-v02.api.letsencrypt.org/directory + auto_https prefer_wildcard + email akanealw@gmail.com +} + +(auth-local) { + forward_auth authelia:9091 { + copy_headers Remote-User Remote-Groups Remote-Name Remote-Email + uri /api/verify?rd=https://auth.akanealw.com + } +} +(auth-remote) { + forward_auth {args.0} "https://auth.akanealw.com" { + uri /api/verify?rd=https://auth.akanealw.com + copy_headers Remote-User Remote-Groups Remote-Name Remote-Email + header_up Host {upstream_hostport} + } +} + +(https) { + transport http { + tls + tls_insecure_skip_verify + } +} + +(wildcard-akanealw.com) { + handle { + abort + } + tls { + dns cloudflare cAPH9-QQPzljKAEMurHpRbJ2sS5DqPO1iWIuW8fq + resolvers 1.1.1.1 1.0.0.1 + } +} + +akanealw.com { + import auth-local + reverse_proxy 192.168.1.30:3005 +} + +*.akanealw.com { + import wildcard-akanealw.com +} + +auth.akanealw.com { + reverse_proxy upstream:9091 +} + +bitwarden.akanealw.com { + reverse_proxy 192.168.1.4:8089 +} + +codeserver.akanealw.com { + import auth-local + reverse_proxy 192.168.1.50:3001 +} + +gitea-docker.akanealw.com { + reverse_proxy 192.168.1.4:3001 +} + +gitea.akanealw.com { + reverse_proxy 192.168.1.50:3000 +} + +linkwarden.akanealw.com { + reverse_proxy 192.168.1.4:3232 +} + +whoami.akanealw.com { + import auth-local + reverse_proxy upstream:80 +}