部署 Caddy 反向代理工具¶ Caddy 官方中文文档 官方脚本部署¶ 1sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https 1curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg 1curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list 1sudo apt update 1sudo apt install caddy Caddy 启动、停止、重启、查看状态 启动 1sudo systemctl start caddy 停止 1sudo systemctl stop caddy 重启 1sudo systemctl reload caddy 查看状态 1systemctl status caddy Docker 部署¶ 1mkdir -p /srv /etc/caddy 1 2 3 4 5 6 7 8docker run -d \ --name caddy \ -p 80:80 \ -p 443:443 \ -v /etc/caddy/Caddyfile:/etc/caddy/Caddyfile \ -v caddy_data:/data \ -v caddy_config:/config \ caddy:latest