| From | Sent On | Attachments |
|---|---|---|
| mike | Mar 12, 2009 10:24 am | |
| Igor Sysoev | Mar 12, 2009 12:54 pm | |
| mike | Mar 12, 2009 1:25 pm | |
| Igor Sysoev | Mar 14, 2009 9:56 am | .Other |
| mike | Mar 14, 2009 10:26 am | |
| mike | Mar 14, 2009 10:27 am | |
| Igor Sysoev | Mar 14, 2009 10:48 am | |
| Igor Sysoev | Mar 14, 2009 10:58 am | |
| mike | Mar 14, 2009 11:21 am | |
| Igor Sysoev | Mar 14, 2009 12:46 pm | |
| mike | Mar 14, 2009 1:27 pm |
| Subject: | Re: Igor any change auth_basic_user_file can accept the new regex stuff? | |
|---|---|---|
| From: | Igor Sysoev (is...@rambler-co.ru) | |
| Date: | Mar 14, 2009 10:58:10 am | |
| List: | ru.sysoev.nginx | |
On Sat, Mar 14, 2009 at 10:26:50AM -0700, mike wrote:
Igor, and the original author of the patch - you guys rock. Thank you. This actually solves a problem I tried months ago and had to write some custom script which sucked. Now, my users can use this without having to ask me to re-run the script.
Seems to work like a charm and it allows for infinitely deep recursion
/foo/ works /foo/a/b/c/ works
etc.
It does suck that nginx throws a 500 internal server error when no .htpasswd exists.
Could there be a way with this dynamic auth_basic_user_file thing that it just issues a 403 instead of a 500?
Probably 403 should be return in both cases (static and dynamic) if error is file not found.
2009/3/14 Igor Sysoev <is...@rambler-co.ru>:
On Thu, Mar 12, 2009 at 01:26:07PM -0700, mike wrote:
Yes please!
The patch.
Thanks :)
On Thu, Mar 12, 2009 at 12:54 PM, Igor Sysoev <is...@rambler-co.ru> wrote:
On Thu, Mar 12, 2009 at 10:25:14AM -0700, mike wrote:
i.e.:
location ~* ^/foo/private/(.*) { alias /home/foo/web/private/$1/; auth_basic "Restricted files"; auth_basic_user_file /home/foo/web/private/$1/.htpasswd; }
Thank you so much for your time and effort in nginx! Hopefully this is pretty trivial.
There's patch by Kirill A. Korinskiy in Russian mailing list, that allows variables in auth_basic_user_file. I will look it and if it's good, will include it.
-- Igor Sysoev http://sysoev.ru/en/
-- Igor Sysoev http://sysoev.ru/en/
-- Igor Sysoev http://sysoev.ru/en/






.Other