parse authentication header into $user $password

Maxim Dounin mdounin at mdounin.ru
Tue Jun 26 09:50:00 UTC 2012


Hello!

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

Maxim Dounin



More information about the nginx-devel mailing list