pages-server/Caddyfile
2024-09-14 11:53:32 +08:00

47 lines
No EOL
1.1 KiB
Caddyfile
Raw 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.

{
order gitea before file_server
auto_https disable_redirects
}
(default) {
# Gitea 服务器地址
server https://gitea.com
# Gitea Token需要 organization:read、repository:read、user:read 权限
token please-replace-it
# 默认域名,类似于 Github 的 github.io
domain example.com
# CNAME 配置保存地址
# shared: 在 caddy 实例中共享 alias一般不建议使用
alias path/to/file shared
# 配置缓存 (缓存刷新时间, 文件缓存时间 , 最大单文件缓存大小)
cache 30s 24h 1MB
# 默认 返回 Header可以配置同源策略或更多内容
headers {
Access-Control-Allow-Origin *
}
errors {
# 默认 404 页面,可填写路径或者 URL
404 path/to/file
# 默认 40x 页面,可填写路径或者 URL
40x path/to/file
# 默认 50x 页面,可填写路径或者 URL
50x path/to/file
# 默认 500 页面,可填写路径或者 URL
500 path/to/file
}
# 开启重定向 scheme port
redirect https 302
}
http:// {
import default
}
https:// {
## 填入 https 配置
# tls
import default
}