Aria2安装

wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/aria2.sh && chmod +x aria2.sh && bash aria2.sh

Aria2+WebUI+caddy搭建私有网盘-LMLPHP

安装 Aria2 WebUI前端

安装Caddy

wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/caddy_install.sh && chmod +x caddy_install.sh && bash caddy_install.sh install http.filemanager,http.webdav

配置

# 新建并进入文件夹
mkdir /usr/local/caddy/www && mkdir /usr/local/caddy/www/aria2 && mkdir /usr/local/caddy/www/aria2/Download
cd /usr/local/caddy/www/aria2 # 先安装 unzip 依赖(解压ZIP)。
# CentOS 系统:
yum install unzip -y
# Debian/Ubuntu 系统:
apt-get install unzip -y # 然后下载前端文件
wget -N --no-check-certificate https://github.com/ziahamza/webui-aria2/archive/master.zip
unzip master.zip
mv webui-aria2-master/docs/* .
rm -rf webui-aria2-master/
rm -rf master.zip
# 赋予文件夹权限
chmod -R 755 /usr/local/caddy/www/aria2

配置caddy

echo "http://www.test.cn {
timeouts none
redir https://www.test.cn{url}
}
https://www.test.cn {
root /usr/local/caddy/www/aria2
timeouts none
tls /root/test.crt /root/test.key
gzip
filemanager /Download /usr/local/caddy/www/aria2/Download {
database /usr/local/caddy/filemanager.db
}
}" > /usr/local/caddy/Caddyfile

Aria2+WebUI+caddy搭建私有网盘-LMLPHP

配置webdav

 https://test.cn {
root /usr/local/caddy/www/aria2/Download
timeouts none
tls /root/test.crt /root/test.key
gzip
basicauth / admin password
webdav {
scope /usr/local/caddy/www/aria2/Download
}
}
05-11 15:02