nginx_auth_mysql

Maxim Dounin mdounin at mdounin.ru
Mon Aug 9 16:23:17 MSD 2010


Hello!

On Mon, Aug 09, 2010 at 02:20:44PM +0300, Adam Benayoun wrote:

> Hello all,
> I'm new to nginx (and first post on this mailing list),I have read the wiki
> and scoured the web in order to find a nginx_mysql_auth or nginx_ldap_auth
> module for nginx.
> I am migrating my servers from apache to nginx + nginx-php-fpm now this is
> included with php-5.3.0 and in all of theses servers I am using a
> centralized directory to manage access to phpmyadmin, SVN repositories and
> much more.
> Now my question is this: I haven't been able to find anything that answer my
> needs, I want nginx to talk directly with mysql or ldap and the only think
> I've found is this:
> http://code.svn.wordpress.org/nginx_auth_mysql/README
> 
> Apparently the folks at wordpress have developed something based on the PAM
> auth module by sergio Talens-Oliag but I keep hearing that this module isn't
> non-blocking and therefore might ruin my nginx performance (although on my
> production server, I'll need this only to limit access to phpmyadmin and
> this will be accesses only few times a week apparently).

Yes, it's blocking (as well as auth pam and auth ldap modules 
flying around).

> Does anyone know another modules? Are new modules in the work? Can someone
> enlighten me if using this module will indeed ruin my nginx performance?
> Should I hold with switching from apache to nginx? Because managing htpasswd
> across more than 10 servers isn't something I'm willing to do at this stage.

You may want to try this one:

http://mdounin.ru/hg/ngx_http_auth_request_module/

It's non-blocking and you are free to code any 
authentication/authorization backend.

Maxim Dounin



More information about the nginx mailing list