try use ngx_lua module, in lua code check the db password etc.<div>example http 401 auth (simple chinse version): <a href="http://chenxiaoyu.org/2012/02/08/nginx-lua-401-auth.html">http://chenxiaoyu.org/2012/02/08/nginx-lua-401-auth.html</a><br clear="all">
--<div><div>blog: <a href="http://chenxiaoyu.org" target="_blank">http://chenxiaoyu.org</a><br></div></div><br>
<br><br><div class="gmail_quote">On Mon, Aug 20, 2012 at 5:32 AM, Bob Stanton <span dir="ltr"><<a href="mailto:farseas@gmail.com" target="_blank">farseas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I want to find a secure but simple method for authenticating users in an Nginx environment.  </div><div><br></div><div>I have succeeded in figuring out the auth_basic mod but that does not meet my needs.  </div><div>
<br>

</div><div>I specifically want to supply my own form, get the username and PW, check it against my DB with a CGI program, and then pass values back to Nginx.</div><div><br></div><div>I need explained examples for nginx.conf.  I can write my own backend in C for authentication, that is not part of my question.</div>


<div><br></div><div>1) What should nginx.conf look like?</div><div>2) How are values passed back to nginx? signals? function return codes?</div>
<br>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br></blockquote></div><br></div>