container-server/services/proxy/Caddyfile
2023-02-18 01:23:11 +01:00

158 lines
2.8 KiB
Caddyfile

(logging) {
log {
output stdout
format transform "{common_log}"
}
}
{
local_certs
# email {$TLS_EMAIL}
# acme_ca {$CA_URL}
import logging
}
(errorpages) {
handle_errors {
rewrite * /{http.error.status_code}.html
file_server {
root /srv/errorpages
}
}
}
(maintenance) {
@denied not remote_ip forwarded {$CADDY_BYPASS_IP}
handle @denied {
rewrite * /maintenance.html
file_server {
root /srv/errorpages
status 503
}
}
}
https://{$BASE_DOMAIN} {
import errorpages
import logging
reverse_proxy /_matrix* matrix:8008
root * /srv/homepage
file_server
}
# https://{$BASE_DOMAIN}:8448 {
# import errorpages
# import logging
# reverse_proxy matrix:8008
# }
# needs to be http!
http://autoconfig.{$BASE_DOMAIN} {
file_server {
root /srv/autoconfig
}
}
https://echo.{$BASE_DOMAIN} {
import errorpages
import logging
reverse_proxy echo:8000
}
https://auth.{$BASE_DOMAIN} {
import errorpages
import logging
reverse_proxy authentik:80
}
https://mail.{$BASE_DOMAIN} {
import errorpages
import logging
reverse_proxy roundcube:80
}
https://git.{$BASE_DOMAIN} {
import errorpages
import logging
reverse_proxy forgejo:3000
}
https://ci.{$BASE_DOMAIN} {
import errorpages
import logging
reverse_proxy woodpecker:8000
}
https://cloud.{$BASE_DOMAIN} {
import errorpages
import logging
redir /.well-known/carddav /remote.php/dav
redir /.well-known/caldav /remote.php/dav
redir /.well-known/webfinger /public.php?service=webfinger
reverse_proxy nextcloud:80
}
https://passwords.{$BASE_DOMAIN} {
import errorpages
import logging
reverse_proxy /notifications/hub/negotiate* vaultwarden:80
reverse_proxy /notifications/hub* vaultwarden:3012
reverse_proxy vaultwarden:80
}
https://md.{$BASE_DOMAIN} {
import errorpages
import logging
reverse_proxy hedgedoc:3000
}
# https://ci-demo.{$BASE_DOMAIN} {
# import errorpages
# import logging
# reverse_proxy docker-ci-demo:8000
# }
# https://stuff.{$BASE_DOMAIN} {
# import errorpages
# import logging
# root * /srv/stuff
# file_server browse
# basicauth /dev {
# dev {$DEV_PASS}
# }
# }
# https://hackmd-next.{$BASE_DOMAIN} {
# import errorpages
# import logging
# reverse_proxy codimd:3000
# }
# https://amp.{$BASE_DOMAIN} {
# import errorpages
# import logging
# reverse_proxy minecraft:8080
# }
# https://map.amp.{$BASE_DOMAIN} {
# import errorpages
# import logging
# root * /srv/bluemap
# file_server
# reverse_proxy /live/* minecraft:8123
# @JSONgz {
# path *.json
# file {
# try_files {path}.gz
# }
# }
# route @JSONgz {
# rewrite {http.matchers.file.relative}
# header Content-Type application/json
# header Content-Encoding gzip
# }
# }