官方文档:https://caddyserver.com/docs/

安装Caddy

运行以下命令:

wget -N --no-check-certificate https://raw.githubusercontent.com/iiiiiii1/doubi/master/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh
#备用地址
wget -N --no-check-certificate https://www.moerats.com/usr/shell/Caddy/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh

caddy反代https模板(会自动申请ssl证书并开启https)

echo "(去掉括号替换为你的域名) {
 gzip
 tls (去掉括号替换为你的邮箱)
 proxy / (去掉括号替换为反代的网址)
}" > /usr/local/caddy/Caddyfile

之后执行重启Caddy

/etc/init.d/caddy restart
Last modification:February 26, 2022
If you think my article is useful to you, please feel free to appreciate