Caddyfile 配置文件生成器

100% 浏览器本地・零服务器上传

可视化配置 Caddy 2 自动 HTTPS、反向代理、单页 SPA 与安全响应头

Domain & Automatic TLS (HTTPS)

Routing Architecture

Separate multiple upstreams with spaces for load balancing.

Security & Performance Optimizations

Caddyfile
{
    email [email protected]
}

app.example.com {
    # Gzip and Zstandard high-performance compression
    encode gzip zstd

    # Security response headers
    header {
        Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
        X-Content-Type-Options "nosniff"
        X-Frame-Options "SAMEORIGIN"
        Referrer-Policy "strict-origin-when-cross-origin"
    }

    # Reverse proxy upstream
    reverse_proxy 127.0.0.1:3000

    # JSON structured access logs
    log {
        output file /var/log/caddy/access.log
        format json
    }

}

将此工具固定在浏览器侧边栏

随时按下 Alt+M 即可在当前标签页侧边唤出此工具,免去切网页的麻烦。100% 离线免费。

获取浏览器插件

如何生成生产级 Caddyfile 配置文件

  1. 1输入绑定的域名及用于 Let's Encrypt 证书签发的管理员邮箱。
  2. 2选择业务模式:反向代理(支持多后端负载均衡)、静态 SPA 或 301 重定向。
  3. 3勾选开启 Zstandard/Gzip 压缩及 HSTS 等安全响应头。
  4. 4下载或复制生成的 Caddyfile,放入服务器或挂载至 Docker 容器中使用。

无需 Certbot 的自动 HTTPS

Caddy 原生内置全自动证书续期与安全重定向,免去复杂的外部证书工具链维护。

常见问题解答 (FAQ)

喜欢 Caddyfile 配置文件生成器 吗?分享给你的工程师朋友,一起告别广告与隐私泄露!

MiniToolDesk 100% 离线计算、零数据上传,您的支持是保持纯净无广告的动力。

相关开发者工具