Caddy 是一款自带 HTTPS 的 Web 服务器,自动申请证书,告别繁琐配置。它支持简洁的 Caddyfile 和强大的 JSON 配置,扩展性极佳。适合追求开箱即用、重视安全且希望简化运维流程的开发者和站长。
核心亮点:
- 默认启用 HTTPS,自动管理证书续期
- 配置语法简洁直观,上手门槛极低
- 支持动态配置,无需重启即可生效
- 基于 Go 构建,插件生态丰富灵活
当前版本 v2.11.9(2026-11-05 发布),开源协议 Apache-2.0,GitHub 79,553 star。


核心信息
| 软件名称 | Caddy(caddyserver/caddy) |
| 当前版本 | v2.11.9 |
| 更新日期 | 2026-11-05 |
| 开源协议 | Apache-2.0 |
| 软件分类 | 自托管服务 |
| 关键词 | acme、automatic-https、caddy、caddyfile、go、golang |
本次更新内容
- 修复PHP目录索引回退问题,解决WordPress等应用访问报错
- 修正路径占位符大小写处理逻辑,确保路径匹配准确无误
- 解决FastCGI安全漏洞,防止客户端伪造环境变量覆盖配置
- 修复Windows下短文件名及NTFS流导致的脚本执行风险
- 新增纯文本目录列表时间格式选项,提升浏览体验
查看官方英文更新日志(原文)
This is a quick follow-up on top of 2.11.8, to fix a regression it introduced and a few more security issues, mostly in FastCGI. It contains only fixes backported from master, plus a couple of small additions. **If you're on 2.11.8 and serve PHP, we recommend upgrading.**
**Huge thank you to our sponsors for keeping the project alive with resources, and for our maintainers who triage and assist tirelessly in this relentless new age of AI.**
## Highlights
- **Fixed: PHP directory indexes (regression in 2.11.8).** A request for a directory with a trailing slash, like `/wp-admin/`, was matched by the directory itself instead of its `index.php`, so it never reached PHP and usually got a 404. This broke WordPress admin pages and other apps that serve an index through a trailing-slash URL. A `try_files` pattern now only matches a directory when it ends in `/`. Thanks @dunglas! (#8352)
- **Path matchers with placeholders** now work as expected: placeholders like `{env.FOO}` are no longer lower-cased into `{env.foo}` before they're looked up, and their values are compared case-insensitively against the request path, like static patterns. Thanks @BenMacha! (#8343)
- **New `plain_time_format` option for [`file_server browse`](https://caddyserver.com/docs/caddyfile/directives/file_server):** sets the time layout of plain-text directory listings (`Accept: text/plain`). Thanks @steffenbusch! (#8084)
- **Fewer allocations** in path cleaning, header rewriting and `weighted_round_robin` selection. Thanks @jvoisin! (#7842)
- **For plugin authors:** new `httpcaddyfile.Helper.IsNamedRoute()` tells a directive whether it's being parsed inside a [named route](https://caddyserver.com/docs/caddyfile/concepts#named-routes). (#8354)
## :warning: Breaking changes
- **Conflicting `client_auth` is now a Caddyfile error.** When two site blocks share TLS connection policies for the same hostname but set different `client_auth`, the adapter used to keep the first one and silently drop the other, which could quietly remove a stricter mTLS requirement. (#8306)
- **FastCGI requests that are ambiguous about which script they run get `400`:**
- when the escaped path (which `%`-containing path matchers see) and the decoded path would select different scripts, e.g. `/public/tool.php%2f..%2f..%2fadmin%2ftool.php` (#8357)
- on Windows, script paths with an 8.3 short name component (like `ADMINI~1`) or a `:` (NTFS alternate data streams) (#8356)
- **FastCGI `env` values now take precedence over request headers**, so a client can no longer override `HTTP_*` variables you set with `env` (see below). (#8358)
## Security fixes
Thank you to everyone who reported responsibly and helped with patches:
- fastcgi: A client could override any `HTTP_*` variable set with the FastCGI transport's (or `php_fastcgi`'s) `env` subdirective by sending a matching request header, for example choosing the user an application sees in `HTTP_X_AUTH_USER`. Configured values now
下载地址
以下为官方原包,本站不二次打包,点击直接下载:
caddy_2.11.9_linux_amd64.deb(官方原包 | 17.2 MB)
✅ 上方 SHA256 与官方发布值一致,可自行核对。
快速上手
- 运行下载好的安装包完成安装
- 使用文本编辑器创建 Caddyfile 配置文件
- 在终端执行 caddy run 命令启动服务
- 在浏览器访问 localhost 验证运行状态
提示:Caddy 默认自动配置 HTTPS,无需额外设置证书
讨论(0 条)