加载中...

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
posted @ 2025-03-29 12:24  水车  阅读(59)  评论(0)    收藏  举报