User Tools

This is an old revision of the document!


I use NGINX for this:

webdav.conf
location ~ ^/public {
        root /data/archive/;
 
        dav_methods PUT DELETE MKCOL COPY MOVE;
        dav_ext_methods PROPFIND OPTIONS;
        dav_access user:rw group:rw all:r;
 
        client_max_body_size 0;
        create_full_put_path on;
        client_body_temp_path /data/archive/temp;
 
}
 
location ~ ^/home/(.*)$ {
        alias /home/$remote_user/$1;
 
        auth_pam "Casa";
        auth_pam_service_name "nginx";
 
        dav_methods PUT DELETE MKCOL COPY MOVE;
        dav_ext_methods PROPFIND OPTIONS;
        dav_access user:rw group:rw all:r;
 
        client_max_body_size 0;
        create_full_put_path on;
        client_body_temp_path /home/temp;
}

the trick here is to match root content with actual location path (so, if root is /data/stuff and location is /archive, create folder /data/stuff/archive). Put temp folder on same drive to prevent file copying on upload.