2 messages in ru.sysoev.nginxDynamically defining auth user file
FromSent OnAttachments
mikeJan 18, 2009 11:08 pm 
Manlio PerilloJan 19, 2009 3:13 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Dynamically defining auth user fileActions...
From:mike (mike@gmail.com)
Date:Jan 18, 2009 11:08:23 pm
List:ru.sysoev.nginx

i have this snippet

if ($request_uri ~* "/foo/(.+)/") { set $htpasswd /home/foo/$1/.htpasswd; } auth_basic "Restricted files"; auth_basic_user_file $htpasswd;

this shows in the error log:

009/01/18 23:07:49 [crit] 11167#0: *2670248 open() "/etc/nginx/$htpasswd" failed (2: No such file or directory), client: 1.2.3.4, server: foo.com, request: "GET /9389fd09fsd/ HTTP/1.1", host: "foo.com"

is there a way to make this work with variables? or is that impossible? (any other ideas, as well?)