Files
biji/docker/caddy/biji-qianduan.caddy
黄孟 8cdba1c0e6 docs(README): 更新项目文档并添加部署指南
- 在 README.md 中添加了详细的项目结构、快速开始、使用指南、开发指南等内容
- 新增生产环境部署步骤,包括前端和后端的构建
2025-08-06 16:06:35 +08:00

25 lines
564 B
Plaintext
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.
前端页面部署,在/config/caddy.d目录下
xxx.com { # 你的前端域名
root * /usr/share/caddy
# 静态资源JS、CSS、图片等缓存 1 年
@static {
path *.js *.css *.png *.jpg *.jpeg *.gif *.ico *.svg *.woff *.woff2
}
header @static Cache-Control "public, max-age=259200, immutable"
# HTML 文件不缓存
@html {
path *.html
}
header @html Cache-Control "no-cache, no-store, must-revalidate"
# 静态文件需要的
file_server
# 也可以直接在这里反向代理后端
}