| From | Sent On | Attachments |
|---|---|---|
| nginx.mailinglist | Jul 23, 2009 2:49 am | |
| Igor Sysoev | Jul 23, 2009 2:51 am | |
| nginx.mailinglist | Jul 23, 2009 3:21 am | |
| Igor Sysoev | Jul 23, 2009 3:42 am | |
| nginx.mailinglist | Jul 23, 2009 3:56 am | |
| Igor Sysoev | Jul 23, 2009 3:56 am | |
| István | Jul 23, 2009 4:13 am | |
| nginx.mailinglist | Jul 23, 2009 4:28 am | |
| István | Jul 23, 2009 5:01 am |
| Subject: | Re: authentication being passed to php | |
|---|---|---|
| From: | Igor Sysoev (is...@rambler-co.ru) | |
| Date: | Jul 23, 2009 3:56:50 am | |
| List: | ru.sysoev.nginx | |
On Thu, Jul 23, 2009 at 11:57:06AM +0100, nginx.mailinglist wrote:
Hi Igor its ok i got it working now!
all i have to do was add this to my config
*fastcgi_pass_header ** **Authorization;*
i wasn't testing the HTTP request properly so wasn't seeing the results expected
fastcgi_pass_header passes headers from backend to client. It can not resolve your issue.
Thank you very much! made my work day
2009/7/23 Igor Sysoev <is...@rambler-co.ru>
On Thu, Jul 23, 2009 at 11:22:19AM +0100, nginx.mailinglist wrote:
Thank you I see that works fine for that particular user:pass combo
but (sorry to be a pain)
that means i have to encode the user:pass combination into the config file
what happens if there are thousands of user:pass combinations?
how can this info be dynamically passed to the php backend for authentication to occur there (by looking up in a database for example)?
i cant be updating the config file everytime a new user is added that can be crazy especially if there are thousands or more users
Regards
edit: i google and found this old email conversation on nginx mailinglist
I do not understand your problem. nginx passes client's user:pass in Authorization header transparently.
2009/7/23 Igor Sysoev <is...@rambler-co.ru>
On Thu, Jul 23, 2009 at 10:50:12AM +0100, nginx.mailinglist wrote:
Hello just a quick question
in lighttpd i was able to pass the username and pass from the url to php backend
but nothing happens in nginx?
let me explain
lets say you have a URL like this
http://userX:passY@exa...@
i expect my php backend to have user and pass entries in the $_SERVER variable as happens with lighttpd
am i missing something with nginx? is it even possible?
$echo userX:passY | perl -MMIME::Base64 -lne 'print encode_base64 $_' dXNlclg6cGFzc1k=
proxy_pass http://example.com/bleh.php; proxy_set_header Authorization "Basic dXNlclg6cGFzc1k=";
-- Igor Sysoev http://sysoev.ru/en/
-- Igor Sysoev http://sysoev.ru/en/
-- Igor Sysoev http://sysoev.ru/en/





