Caddy文件服务器

启动命令

root@hk2:/home/caddy# cat start.sh 
 docker run -d -p 80:80 \
    --name caddy \
    --net=host \
    -v $PWD/index.html:/usr/share/caddy/index.html \
    -v caddy_data:/data \
    -v /home/uptime-status:/public \
    -v $PWD/Caddyfile:/etc/caddy/Caddyfile \
    -v /home/share:/home/share \
    caddy

配置文件Caddyfile

ks.qwq.com {
    reverse_proxy localhost:1991
}

hkfile.qwq.com {
file_server {
    root /home/share
    hide .*
    browse
  }
}
posted @ 2024-12-18 09:10  iXiAo9  阅读(56)  评论(0)    收藏  举报