107 lines
2.5 KiB
Caddyfile
107 lines
2.5 KiB
Caddyfile
{
|
|
acme_dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG
|
|
}
|
|
bizmatch.net {
|
|
tls {
|
|
dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG
|
|
}
|
|
}
|
|
www.bizmatch.net {
|
|
tls {
|
|
dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG
|
|
}
|
|
}
|
|
bayarea-cc.com, www.bayarea-cc.com {
|
|
# SSL/TLS mit Cloudflare DNS Challenge
|
|
tls {
|
|
dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG
|
|
}
|
|
|
|
# Reverse Proxy für API-Anfragen (hat Vorrang)
|
|
@api {
|
|
path /api/*
|
|
}
|
|
reverse_proxy @api host.docker.internal:3001 {
|
|
header_up X-Real-IP {remote_host}
|
|
}
|
|
|
|
# Statische Dateien nur für nicht-API-Pfade
|
|
@notApi {
|
|
not path /api/*
|
|
}
|
|
root * /app
|
|
try_files @notApi {path} /index.html
|
|
file_server @notApi
|
|
|
|
# Logging für Debugging
|
|
log {
|
|
output stderr
|
|
format console
|
|
}
|
|
|
|
encode gzip
|
|
}
|
|
auth.bizmatch.net {
|
|
reverse_proxy keycloak:8080 {
|
|
header_up Host {http.request.host}
|
|
header_up X-Real-IP {http.request.remote}
|
|
header_up X-Forwarded-For {http.request.remote}
|
|
header_up X-Forwarded-Host {http.request.host}
|
|
header_up X-Forwarded-Server {http.request.host}
|
|
header_up X-Forwarded-Port {http.request.port}
|
|
header_up X-Forwarded-Proto {http.request.scheme}
|
|
header_up Upgrade {http.request.header.Upgrade}
|
|
header_up Connection {http.request.header.Connection}
|
|
# Entfernen des X-Frame-Options-Headers
|
|
# header_up -X-Frame-Options
|
|
}
|
|
tls {
|
|
dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG
|
|
}
|
|
}
|
|
gitea.bizmatch.net {
|
|
reverse_proxy gitea:3500
|
|
tls {
|
|
dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG
|
|
}
|
|
}
|
|
|
|
dev.bizmatch.net {
|
|
handle /pictures/* {
|
|
root * /home/aknuth/git/bizmatch-project/bizmatch-server
|
|
file_server
|
|
}
|
|
|
|
handle {
|
|
root * /srv
|
|
try_files {path} {path}/ /index.html
|
|
file_server
|
|
}
|
|
|
|
log {
|
|
output file /var/log/caddy/access.log {
|
|
roll_size 10MB
|
|
roll_keep 5
|
|
roll_keep_for 48h
|
|
}
|
|
}
|
|
|
|
encode gzip
|
|
|
|
tls {
|
|
dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG
|
|
}
|
|
}
|
|
|
|
api-dev.bizmatch.net {
|
|
reverse_proxy host.docker.internal:3000 {
|
|
header_up X-Real-IP {http.request.header.CF-Connecting-IP}
|
|
header_up X-Forwarded-For {http.request.header.CF-Connecting-IP}
|
|
header_up X-Forwarded-Proto {http.request.header.X-Forwarded-Proto}
|
|
header_up CF-IPCountry {http.request.header.CF-IPCountry}
|
|
}
|
|
tls {
|
|
dns cloudflare q1P7J3uqS96FGj_iiX2mI8y1ulTaIFrTp8tyTXhG
|
|
}
|
|
}
|