Thank you<div><br></div><div>I see that works fine for that particular user:pass combo</div><div><br></div><div>but (sorry to be a pain)</div><div><br></div><div>that means i have to encode the user:pass combination into the config file</div>
<div><br></div><div>what happens if there are thousands of user:pass combinations?</div><div><br></div><div>how can this info be dynamically passed to the php backend for authentication to occur there (by looking up in a database for example)?</div>
<div><br></div><div>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</div><div><br></div><div>Regards<br><br></div><div>edit: i google and found this old email conversation on nginx mailinglist</div>
<div><a href="http://markmail.org/message/tl7h2fclizgptwnr#query:NGINX%20PHP%20AUTHENTICATION+page:1+mid:f3xw2gjllat6urff+state:results">http://markmail.org/message/tl7h2fclizgptwnr#query:NGINX%20PHP%20AUTHENTICATION+page:1+mid:f3xw2gjllat6urff+state:results</a></div>
<div><br><div class="gmail_quote">2009/7/23 Igor Sysoev <span dir="ltr">&lt;<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Thu, Jul 23, 2009 at 10:50:12AM +0100, nginx.mailinglist wrote:<br>
<br>
&gt; Hello<br>
&gt; just a quick question<br>
&gt;<br>
&gt; in lighttpd i was able to pass the username and pass from the url to php<br>
&gt; backend<br>
&gt;<br>
&gt; but nothing happens in nginx?<br>
&gt;<br>
&gt; let me explain<br>
&gt;<br>
&gt;<br>
&gt; lets say you have a URL like this<br>
&gt;<br>
&gt; <a href="http://userX:passY@example.com/bleh.php" target="_blank">http://userX:passY@example.com/bleh.php</a><br>
&gt;<br>
&gt;<br>
&gt; i expect my php backend to have user and pass entries in the $_SERVER<br>
&gt; variable as happens with lighttpd<br>
&gt;<br>
&gt; am i missing something with nginx? is it even possible?<br>
<br>
</div></div>$echo userX:passY | perl -MMIME::Base64 -lne &#39;print encode_base64 $_&#39;<br>
dXNlclg6cGFzc1k=<br>
<br>
      proxy_pass <a href="http://example.com/bleh.php" target="_blank">http://example.com/bleh.php</a>;<br>
      proxy_set_header  Authorization &quot;Basic dXNlclg6cGFzc1k=&quot;;<br>
<font color="#888888"><br>
<br>
--<br>
Igor Sysoev<br>
<a href="http://sysoev.ru/en/" target="_blank">http://sysoev.ru/en/</a><br>
<br>
</font></blockquote></div><br></div>