diff --git a/caddy/Caddyfile b/caddy/Caddyfile index 01ee816..78599c7 100644 --- a/caddy/Caddyfile +++ b/caddy/Caddyfile @@ -6,20 +6,51 @@ bizmatch.net { dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG } } -bayarea-cc.com { - tls { - dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG - } -} www.bizmatch.net { tls { dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG } } -www.bayarea-cc.com { +// www.bayarea-cc.com { +// tls { +// dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG +// } +// } +// bayarea-cc.com { +// tls { +// dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG +// } +// } +bayarea-cc.com, www.bayarea-cc.com { + # SSL/TLS mit Cloudflare DNS Challenge tls { dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG } + + # Statische Dateien aus dem Angular Build-Verzeichnis + root * /home/aknuth/git/bay-area-affiliates/dist/bay-area-affiliates/browser + file_server + + # Reverse Proxy für API-Anfragen an Nest.js + @api { + path /api/* + } + reverse_proxy @api localhost:3001 { + # Optional: Header für Debugging + header_up X-Real-IP {remote_host} + } + + # Fallback für Angular SPA Routing + try_files {path} /index.html + + # Logging (optional) + log { + output file /var/log/caddy/bayarea-cc.log + format console + } + + # Komprimierung für bessere Performance + encode gzip } auth.bizmatch.net { reverse_proxy keycloak:8080 {