Files
2026-09-04 14:50:34 +08:00

32 lines
1.0 KiB
Caddyfile
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Caddy 反向代理配置 — 本地 IP + 自签证书方案
#
# 通过三个本地主机名统一入口(80/443),需在访问端 /etc/hosts 追加:
# <本机IP> gateway.chongming.local s3.chongming.local minio.chongming.local
#
# 证书方案:每站均用 `tls internal` 由 Caddy 内置根证书签发自签证书,
# 不走公网 ACME,适合内网/测试环境。浏览器首次访问会提示不受信任,
# 无需理会本机(curl 可加 -k,浏览器可加例外)。
{
# 全局默认启用自签(即使某站忘记写 tls 指令,也不会误触公网 ACME)
auto_https disable_redirects
}
# chongming Web —— 反代宿主机 systemd 托管的 HTTP 8000
# 容器经 host.docker.internal(extra_hosts: host-gateway)访问宿主机
gateway.chongming.local {
tls internal
reverse_proxy host.docker.internal:8000
}
# MinIO S3 Object Storage API(9000)
s3.chongming.local {
tls internal
reverse_proxy minio:9000
}
# MinIO Web Console(9001)
minio.chongming.local {
tls internal
reverse_proxy minio:9001
}