Emulate mod_auth_mysql in nginx?
Barry Abrahamson
barry at automattic.com
Mon Mar 16 10:52:55 MSK 2009
On Mar 13, 2009, at 2:00 PM, Floren Munteanu wrote:
> Hi,
>
> I was wondering if we could emulate mod_auth_mysql in nginx?
>
> AuthName "Your Protected Area"
> AuthType Basic
> Auth_MySQL_Username mysqluser
> Auth_MySQL_Password mysqlpass
> Auth_MySQL_DB database
> Auth_MySQL_Password_Table users
> Auth_MySQL_Username_Field username
> Auth_MySQL_Password_Field passwd
> Auth_MySQL_Encrypted_Passwords Off
> Auth_MySQL_Non_Persistent On
> Auth_MYSQL On
> Auth_MySQL_Empty_Passwords Off
> require valid-user
>
> INSERT INTO user VALUES ('abc', '123');
>
> +-------------+-----------+
> | username | passwd |
> +-------------+-----------+
> | abc | 123 |
> +-------------+-----------+
>
> Thanks for your help.
Try this nginx module:
http://code.svn.wordpress.org/nginx_auth_mysql/
Let us know how it goes
--
Barry Abrahamson | Systems Wrangler | Automattic
Blog: http://barry.wordpress.com
More information about the nginx
mailing list