chore(deploy): 同步 Caddyfile.tmpl 与生产实际配置 - #204
Closed
FatNine wants to merge 1 commit into
Closed
Conversation
The template had drifted from /etc/caddy/Caddyfile on the Huawei ECS in two ways — both are live on prod but were missing from the template, so any future reprovision would silently drop them: 1. the /xuedoushan/ static landing-page block (handle_path + file_server) 2. the 2026-08-21 crawler-archive block: 403 */archive/* for the Baidu render bot (fixed Chrome/83.0.4103.106 UA) and meta-externalagent, which ignore robots.txt and were minting .bundle archives for every crawled commit sha (34G in two weeks under data/repo-archive) Template is byte-identical to the production file except the __ACME_EMAIL__ placeholder. No runtime change: prod already runs this exact config. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
Author
|
改为在私有运维仓库维护生产 Caddyfile(生产专属配置不入公共仓库),关闭本 PR。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的
deploy/ecs/caddy/Caddyfile.tmpl与华为生产/etc/caddy/Caddyfile已漂移两处——都已在生产生效但未回写模板,未来用 ecs-bootstrap.sh 重建/换机时会静默丢失:/xuedoushan/静态落地页块(handle_path + file_server)——历史手工上线,未回写;Chrome/83.0.4103.106UA)和meta-externalagent的*/archive/*请求返 403。背景:这两类爬虫无视 robots.txt(默认规则已 disallow archive/bundle),为每个爬到的 commit sha 铸造 .bundle 压缩包,两周产生 34G repo-archive,是天翼云冷备磁盘事故的根因之一(详见私有运维仓库 addendum:2026-08-20-ctyun-replica-retention-and-payload-fix)。变更性质
__ACME_EMAIL__占位符替换回ops@synnovator.com);验证
diff <(sed 还原占位符后的模板) <(生产 /etc/caddy/Caddyfile)为空。🤖 Generated with Claude Code