nginx public webdav server
Posted
by
Gert Cuykens
on Server Fault
See other posts from Server Fault
or by Gert Cuykens
Published on 2012-06-25T17:57:34Z
Indexed on
2012/06/27
9:17 UTC
Read the original article
Hit count: 240
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'
© Server Fault or respective owner