nginx搭建webdav服务器的配置

Posted by he; tagged with none

配置如下:

server
{
    listen 80;
    server_name 域名;
    location / {
        auth_basic "Authorization";
        auth_basic_user_file /www/路径/pass.pass; #用户名密码文件,格式user:pass
        root /www/路径; #注意修改成自己的目录
        client_max_body_size 10000M; #大文件支持,最大允许上传
        autoindex on;
        dav_methods PUT DELETE MKCOL COPY MOVE;
        # 需要 nginx-dav-ext-module 才有下面的选项
        dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;
        create_full_put_path  on;
    }

}

注意目录的权限。

- 本文完 -