ubuntu24 安装 caddy
稳定版本安装命令
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy
配置Caddyfile
配置文件在 /etc/caddy/Caddyfile
vi /etc/caddy/Caddyfile
# 配置内容
域名 {
reverse_proxy localhost:9001
}
域名 {
reverse_proxy localhost:9003
}
重启caddy
caddy stop
caddy run
博客中所涉及到的图片都有版权,请谨慎使用