From 7a60db0b7b3e4837aa1627b8d06c6893a2bef18c Mon Sep 17 00:00:00 2001 From: traveler Date: Fri, 27 Dec 2024 13:01:49 -0600 Subject: [PATCH] wr --- Caddyfile | 49 +++++++++++++++++++++++-------------------------- Caddyfile.old | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 26 deletions(-) mode change 100755 => 100644 Caddyfile create mode 100755 Caddyfile.old diff --git a/Caddyfile b/Caddyfile old mode 100755 new mode 100644 index f1657a7..7bd4583 --- a/Caddyfile +++ b/Caddyfile @@ -1,45 +1,42 @@ dns.netgrimoire.com { - reverse_proxy 192.168.5.7:5380/ - } + reverse_proxy 192.168.5.7:5380 +} webtop.netgrimoire.com { - reverse_proxy http://webtop:3000 - } + reverse_proxy http://webtop:3000 +} +(mailcow-proxy) { + reverse_proxy mailcow-nginx:80 +} mail.netgrimoire.com, imap.netgrimoire.com, smtp.netgrimoire.com, autodiscover.netgrimoire.com, autoconfig.netgrimoire.com { - reverse_proxy mailcow-nginx:80 - + import mailcow-proxy } mail.wasted-bandwidth.net, imap.wasted-bandwidth.net, smtp.wasted-bandwidth.net, autodiscover.wasted-bandwidth.net, autoconfig.wasted-bandwidth.net { - reverse_proxy mailcow-nginx:80 - + import mailcow-proxy } mail.gnarlypandaproductions.com, imap.gnarlypandaproductions.com, smtp.gnarlypandaproductions.com, autodiscover.gnarlypandaproductions.com, autoconfig.gnarlypandaproductions.com { - reverse_proxy mailcow-nginx:80 - + import mailcow-proxy } +(email-proxy) { + reverse_proxy mailcow-nginx:80/sogo +} email.gnarlypandaproductions.com, email.netgrimoire.com, email.wasted-bandwidth.net { - reverse_proxy mailcow-nginx:80/sogo/ - + import email-proxy } +(authentik) { + route /outpost.goauthentik.io/* { + reverse_proxy http://authentik:9000 + } - - - (authentik) { - # Always forward outpost path to actual outpost - reverse_proxy /outpost.goauthentik.io/* http://authentik:9000 - - # Forward authentication to outpost - forward_auth http://authentik:9000 { - uri /outpost.goauthentik.io/auth/caddy - - # Capitalization of the headers is important, otherwise they will be empty - copy_headers X-Authentik-Username X-Authentik-Groups 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 - } -} \ No newline at end of file + forward_auth http://authentik:9000 { + uri /outpost.goauthentik.io/auth/caddy + copy_headers X-Authentik-Username X-Authentik-Groups 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 + } +} diff --git a/Caddyfile.old b/Caddyfile.old new file mode 100755 index 0000000..f1657a7 --- /dev/null +++ b/Caddyfile.old @@ -0,0 +1,45 @@ +dns.netgrimoire.com { + reverse_proxy 192.168.5.7:5380/ + } + +webtop.netgrimoire.com { + reverse_proxy http://webtop:3000 + } + + +mail.netgrimoire.com, imap.netgrimoire.com, smtp.netgrimoire.com, autodiscover.netgrimoire.com, autoconfig.netgrimoire.com { + reverse_proxy mailcow-nginx:80 + +} + +mail.wasted-bandwidth.net, imap.wasted-bandwidth.net, smtp.wasted-bandwidth.net, autodiscover.wasted-bandwidth.net, autoconfig.wasted-bandwidth.net { + reverse_proxy mailcow-nginx:80 + +} + +mail.gnarlypandaproductions.com, imap.gnarlypandaproductions.com, smtp.gnarlypandaproductions.com, autodiscover.gnarlypandaproductions.com, autoconfig.gnarlypandaproductions.com { + reverse_proxy mailcow-nginx:80 + +} + + +email.gnarlypandaproductions.com, email.netgrimoire.com, email.wasted-bandwidth.net { + reverse_proxy mailcow-nginx:80/sogo/ + +} + + + + + (authentik) { + # Always forward outpost path to actual outpost + reverse_proxy /outpost.goauthentik.io/* http://authentik:9000 + + # Forward authentication to outpost + forward_auth http://authentik:9000 { + uri /outpost.goauthentik.io/auth/caddy + + # Capitalization of the headers is important, otherwise they will be empty + copy_headers X-Authentik-Username X-Authentik-Groups 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 + } +} \ No newline at end of file