Files
cloudhaus-docker/Caddyfile
2026-01-14 22:31:34 +02:00

275 lines
5.4 KiB
Caddyfile

# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.
{
metrics {
per_host
}
crowdsec {
api_url http://localhost:8080
api_key qa2/ilnhpYrrisOIvUSYpViTgDNyT7IkHHgDgweAeBY
ticker_interval 15s
}
log {
output file /var/log/caddy/access.log
format json
}
}
speed.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 10.0.0.2:8765 {
header_up Host {upstream_hostport}
}
}
}
docker.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 127.0.0.1:9100
}
}
sync.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 127.0.0.1:8384 {
header_up Host localhost:8384
}
}
}
notes.mycloudhaus.xyz {
route {
crowdsec
basic_auth {
theo $2a$14$mJszfW/9Pay63RdHY7Om1e0VdYaCWwP5QnpzdM7oCbrCnYQzB8.bS
}
reverse_proxy 127.0.0.1:3050 {
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
}
}
}
keybr.mycloudhaus.xyz {
route {
crowdsec
basic_auth {
theo $2a$14$mJszfW/9Pay63RdHY7Om1e0VdYaCWwP5QnpzdM7oCbrCnYQzB8.bS
# Username "Bob", password "hiccup"
}
reverse_proxy 10.0.0.2:3000
}
}
torrents.mycloudhaus.xyz {
route {
crowdsec
basic_auth {
theo $2a$14$mJszfW/9Pay63RdHY7Om1e0VdYaCWwP5QnpzdM7oCbrCnYQzB8.bS
# Username "Bob", password "hiccup"
}
reverse_proxy 10.0.0.2:9091
}
}
searxng.mycloudhaus.xyz {
route {
crowdsec
# basic_auth {
# # Username "Bob", password "hiccup"
# theo $2a$14$mJszfW/9Pay63RdHY7Om1e0VdYaCWwP5QnpzdM7oCbrCnYQzB8.bS
# }
reverse_proxy 127.0.0.1:7001
}
}
boards.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 127.0.0.1:8765
}
}
twitch.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 127.0.0.1:8280
}
}
inv.mycloudhaus.xyz {
route {
crowdsec
basic_auth {
# Username "Bob", password "hiccup"
theo $2a$14$mJszfW/9Pay63RdHY7Om1e0VdYaCWwP5QnpzdM7oCbrCnYQzB8.bS
}
reverse_proxy 10.0.0.2:4000
}
log {
output discard
}
}
radicale.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 127.0.0.1:5232
}
}
rss.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 127.0.0.1:8011
}
}
vw.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 127.0.0.1:9000 {
header_up X-Real-IP {remote_host}
}
}
}
bookmarks.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 10.0.0.2:5000
}
}
home.mycloudhaus.xyz {
route {
crowdsec
basic_auth {
# Username "Bob", password "hiccup"
theo $2a$14$mJszfW/9Pay63RdHY7Om1e0VdYaCWwP5QnpzdM7oCbrCnYQzB8.bS
}
reverse_proxy 127.0.0.1:8099
}
}
logs.mycloudhaus.xyz {
route {
crowdsec
basic_auth {
# Username "Bob", password "hiccup"
theo $2a$14$mJszfW/9Pay63RdHY7Om1e0VdYaCWwP5QnpzdM7oCbrCnYQzB8.bS
}
reverse_proxy 127.0.0.1:3030
}
}
health.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 127.0.0.1:3001
}
}
git.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 127.0.0.1:3002
}
}
media.mycloudhaus.xyz {
route {
crowdsec
reverse_proxy 10.0.0.2:8096
header {
X-Forwarded-Proto {scheme}
X-Forwarded-For {remote_host}
X-Real-IP {remote_host}
}
}
}
radio.mycloudhaus.xyz {
route {
crowdsec
# @allowed path / /profile* /admin* /docs* /logout* /login* /dashboard* /station* /public*
# reverse_proxy @allowed 10.0.0.2:6000
reverse_proxy 10.0.0.2:6000
# respond "Not found" 404
}
}
convert.mycloudhaus.xyz {
basic_auth {
# Username "Bob", password "hiccup"
theo $2a$14$mJszfW/9Pay63RdHY7Om1e0VdYaCWwP5QnpzdM7oCbrCnYQzB8.bS
}
reverse_proxy 127.0.0.1:6000
}
#prom.mycloudhaus.xyz {
# basic_auth {
# # Username "Bob", password "hiccup"
# theo $2a$14$mJszfW/9Pay63RdHY7Om1e0VdYaCWwP5QnpzdM7oCbrCnYQzB8.bS
# }
# reverse_proxy prometheus:9090
#}
#
#sec.mycloudhaus.xyz {
## basic_auth {
## Sneak9662 $2a$14$EDiuxXPPj6sXuVsr68MwjOvwcSwnVHa2Q3A.BVyuxBN1odc5FK7pG
## }
# reverse_proxy https://10.0.0.2:443 {
# transport http {
# tls_insecure_skip_verify
# }
# }
#}
mycloudhaus.xyz {
basic_auth {
# Username "Bob", password "hiccup"
theo $2a$14$mJszfW/9Pay63RdHY7Om1e0VdYaCWwP5QnpzdM7oCbrCnYQzB8.bS
}
metrics /metrics
root * /var/www/html
encode gzip
log {
output file /var/log/caddy/my-static-site.log
}
header {
?Cache-Control "max-age=1800"
}
# Enable the static file server.
file_server
# Another common task is to set up a reverse proxy:
# reverse_proxy localhost:8080
# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}
# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile