docker set up webdav service

Foreword

The reason for using Docker to set up WebDAV, because I use a Centos, yum install Nginx is no webdav module, you need to compile it yourself, using Docker Ever since they set up a WebDAV server



Course

I am using BytemarkHostinga mirror

github.com/BytemarkHos…

docker run --name webdav --restart always -v /srv/dav:/var/lib/dav \
    -e AUTH_TYPE=Digest -e USERNAME=alice -e PASSWORD=secret1234 \
    --publish 80:80 -d bytemark/webdav

Note that the host directory can not be changed, otherwise it will error, you may need to mount the directory soft link up

USERNAME and PASSWORD behind custom user password

If you do not want to set a password

docker run --name webdav --restart always -v /srv/dav:/var/lib/dav   -e ANONYMOUS_METHODS=GET,OPTIONS,PROPFIND   --publish 5001:80 -d bytemark/webdav

SSL is not recommended for use on GitHub, recommended to remove -publish 80:80, using Nginx reverse proxy Https



supplement

Mount to the directory of the files in the container can not be removed because of a permissions problem

Into the container

#进入容器
docker exec -it webdav bash
#添加定时任务
crontab -e
#5分钟执行一次赋予www-data用户权限命令
*/5     *       *       *       *       chown -R www-data /var/lib/dav/data


NGINX part

NGINX在下载超过1G时会断连,需要修改nginx.conf文件

在http部分添加如下内容(数字改到自己需要的大小,我的是最大10G)

proxy_max_temp_file_size 10240;

Transfer: weixin_33928467's blog

Published 47 original articles · won praise 2 · Views 3158

Guess you like

Origin blog.csdn.net/a3320315/article/details/101801138