The new regex matching stuff rocks... except it's missing one thing

mike mike503 at gmail.com
Thu Mar 12 00:20:52 MSK 2009


The auth stuff doesn't support it.

Any ideas on how to support dynamically populating the
auth_basic_user_file? Is this a quick and dirty thing? That'd be
awesome if it was.

               location ~* ^/foo/private/(.*) {
                       alias /home/foo/web/private/$1/;
                       auth_basic "Restricted files";
                       auth_basic_user_file /home/foo/web/private/$1/.htpasswd;
               }


2009/03/11 16:16:39 [crit] 14097#0: *11 open()
"/home/foo/web/private/$1/.htpasswd" failed (2: No such file or
directory), client: 1.2.3.4, server: foo.com, request: "GET
/foo/private/demo-video/ HTTP/1.1", host: "foo.com"





More information about the nginx mailing list