jesusjsc

caddy 配置 cloudflare
# caddy 配置 cloudflare --- ## 安装cloudflare插件 ``` c...
扫描右侧二维码阅读全文
15
2019/07

caddy 配置 cloudflare

caddy 配置 cloudflare


安装cloudflare插件

curl https://getcaddy.com | bash -s personal tls.dns.cloudflare

配置caddyfile文件

www.test.com {
    root /path/to/site
    tls {
        dns cloudflare
    }
}

设置环境变量【必须要设置】

编辑文件/etc/systemd/system/multi-user.target.wants/caddy.service,在[Service]节中添加如下

[email protected]
Environment=CLOUDFLARE_API_KEY=123456abcd123sadfs345sdge4t5fdsg34

重载配置,重启服务

systemctl daemon-reload
service caddy restart
Last modification:July 15th, 2019 at 03:13 pm
If you think my article is useful to you, please feel free to appreciate

Leave a Comment