nginx public webdav server
- by Gert Cuykens
Can you check the user group from a $remote_user?
location ~ ^/home/(.*)$ {
alias /home/$remote_user/$1;
auth_pam "Restricted";
auth_pam_service_name "nginx";
dav_methods PUT DELETE MKCOL COPY MOVE;
dav_access group:rw all:r;
create_full_put_path on;
}
location ~ ^/get/(.*)$ {
alias /home/$1;
#check the group of the $remote_user;
}
curl -T test.txt 'http://gert:[email protected]/home/'
curl 'http://friend:[email protected]/get/gert/test.txt'