Aliyun Webdav

获取refresh-token

浏览器F12 –> Application –> Storage –> Local Storage –> token –> refresh-token

安装webdav服务软件

pip install aliyundrive-webdav devfs2 apache2-utils

运行webdav服务

 aliyundrive-webdav [FLAGS] [OPTIONS] --refresh-token <refresh-token>

挂载webdav服务

sudo mkdir -p /mnt/aliyun
sudo mount -t davfs -o noexec http://0.0.0.0:8080 /mnt/aliyun

nginx 配置

sudo ln -sf /mnt/aliyun /usr/share/nginx/html/aliyun
sudo htpasswd -c /etc/.htpasswd user
sudo vi /etc/nginx/site-availble/default

#增加
location /aliyun {
        autoindex on;
        charset utf-8;
        auth_basic           "Administrator’s Area";
        auth_basic_user_file /etc/.htpasswd;
}



sudo systemctl restart nginx

文档信息