Created
May 20, 2024 15:40
-
-
Save se-bastiaan/548dc93d57bd0570f203d0f717e0ef50 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Wildcard domeinnamen en lokaal ip adres | |
*.sebastiaan.app, 192.168.50.103 { | |
tls [email protected] # Email voor Let's encrypt certificate | |
tls { | |
# Settings voor Caddy Cloudflare DNS https://github.com/caddy-dns/cloudflare | |
dns cloudflare "apikey" | |
} | |
tls internal | |
encode gzip | |
root * /etc/caddy/html/ # Standaard output als iemand naar xyz.sebastiaan.app gaat | |
@app1 host app1.sebastiaan.app | |
handle @app1 { | |
# Reverse proxy voor app1.sebastiaan.app | |
reverse_proxy 192.168.50.108:9091 | |
} | |
@app2 host app2.sebastiaan.app | |
handle @app1 { | |
# Reverse proxy voor app2.sebastiaan.app | |
reverse_proxy 192.168.50.109:2020 | |
} | |
log { | |
# Standaardsettings voor access logs | |
output file /var/log/caddy/access.log { | |
roll_size 10mb | |
roll_keep 20 | |
roll_keep_for 720h | |
} | |
} | |
# Als er geen host is die een request afhandeld op basis van het domein: refuse connection | |
@wildcard host *.sebastiaan.app *.cebby.dev | |
handle @wildcard { | |
abort | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment