container-server/services/proxy/Caddyfile
Carsten Sprung ecfbce28d3 setup-docs (#1)
- Add documentation about host setup
- Refactor task files
- Improve documentation

Reviewed-on: carsten/docker-server#1
2022-11-13 00:10:26 +00:00

115 lines
2 KiB
Caddyfile

{
email {$TLS_EMAIL}
acme_ca {$CA_URL}
log {
output stdout
format console
}
}
(errorpages) {
handle_errors {
root * /srv/errorpages
rewrite * /{http.error.status_code}.html
file_server
}
}
# http://autoconfig.{$BASE_DOMAIN} {
# root * /srv/autoconfig
# file_server
# }
https://proxy.{$BASE_DOMAIN} {
import errorpages
reverse_proxy /_matrix* matrix:8008
root * /srv/homepage
file_server
}
# https://{$BASE_DOMAIN}:8448 {
# import errorpages
# reverse_proxy matrix:8008
# }
https://echo.{$BASE_DOMAIN} {
import errorpages
reverse_proxy echo:8000
}
https://ci-demo.{$BASE_DOMAIN} {
import errorpages
reverse_proxy docker-ci-demo:8000
}
# https://stuff.{$BASE_DOMAIN} {
# import errorpages
# root * /srv/stuff
# file_server browse
# basicauth /dev {
# dev {$DEV_PASS}
# }
# }
https://cloud.{$BASE_DOMAIN} {
import errorpages
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://bitwarden.{$BASE_DOMAIN} {
import errorpages
reverse_proxy /notifications/hub/negotiate* bitwarden:80
reverse_proxy /notifications/hub* bitwarden:3012
reverse_proxy bitwarden:80
}
https://git.{$BASE_DOMAIN} {
import errorpages
reverse_proxy gitea:3000
}
https://ci.{$BASE_DOMAIN} {
import errorpages
reverse_proxy drone:80
}
https://hackmd-next.{$BASE_DOMAIN} {
import errorpages
reverse_proxy codimd:3000
}
https://md.{$BASE_DOMAIN} {
import errorpages
reverse_proxy non-existent:3000
}
https://amp.{$BASE_DOMAIN} {
import errorpages
reverse_proxy minecraft:8080
}
https://map.amp.{$BASE_DOMAIN} {
import errorpages
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
}
}