webdav服务=docker+googledrive+ssl+nginx反代+rclone加载

Docker一键开启

# 假设google drive已经被加载到 /data/gd_stanford
mkdir -p /data/gd_stanford/_service/webdav

mkdir /data/webdav_ford && cd /data/webdav_ford && && ln -s /data/gd_stanford/_service/webdav ./storage_symlink

# Basic 方式适合用于http和nginx ssl反代
touch user.passwd.basic 
htpasswd -B user.passwd.basic webdav_ford

docker rm -f webdav_ford # in case already exists
docker run --name=webdav_ford -d \
       --restart always \
       -e AUTH_TYPE=Basic -v /data/webdav_ford/user.passwd.basic:/user.passwd \
       -v /data/webdav_ford/storage_symlink:/var/lib/dav \
       -p 9200:80 \
       bytemark/webdav

docker logs -f webdav_ford

ssl+nginx反代 (cloudflare proxy可开可不开)

mac 本地的rclone加载

# 先rclone config - 如图
# 再加载
cd ~/qh && mkdir webdav_ford
/usr/local/bin/rclone cmount webdav_ford: ~/qh/webdav_ford --copy-links --no-gzip-encoding \
  --no-check-certificate --allow-other --umask 000 \
  --vfs-cache-mode writes \
  --vfs-read-chunk-size 8M \
  --vfs-read-ahead 128M \
  --max-read-ahead 512M \
  --daemon-timeout 30m \
  --log-level DEBUG --log-file ~/tmp/log/rclone.log \
  --daemon

Leave a Reply