parse authentication header into $user $password
Gert Cuykens
gert.cuykens at gmail.com
Tue Jun 26 19:11:48 UTC 2012
On Tue, Jun 26, 2012 at 11:50 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:
>
> On Tue, Jun 26, 2012 at 09:50:18AM +0200, Gert Cuykens wrote:
>
>> location ~ ^/~(.+?)/(.*)$ {
>> if ($user != $1) {return 403;}
>> alias /home/$1/$2;
>> 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;
>> }
>>
>> Can this be implemented pleas?
>
> Try $remote_user.
>
> http://nginx.org/en/docs/http/ngx_http_core_module.html#variables
Works, thanks
More information about the nginx-devel
mailing list