head	1.2;
access;
symbols
	RELEASE_8_1_0:1.1;
locks; strict;
comment	@# @;


1.2
date	2010.08.28.10.59.47;	author mm;	state dead;
branches;
next	1.1;

1.1
date	2010.04.12.04.21.15;	author dinoex;	state Exp;
branches;
next	;


desc
@@


1.2
log
@www/lighttpd-mysqlauth integrated into www/lighttpd

Approved by:	dinoex (maintainer, private e-mail)
@
text
@
References:
http://redmine.lighttpd.net/issues/752
http://redmine.lighttpd.net/attachments/1012/03_all_lighttpd-1.4.23-mysql_auth.diff
http://redmine.lighttpd.net/attachments/download/1012/03_all_lighttpd-1.4.23-mysql_auth.diff

This patch allows lighttpd to authenticate users against mySQL DBbr
NOTE: Only basic auth is implemented. Passwords are stored as MD5 hash in DB

make mysql db and user (read mySQL doc's if you don't know how)
import lighttpd-1.4.11-mysql_auth.sql

open lighttpd.conf and add
(be sure that you comment out any other auth - according to lighttpd docs)

auth.backend                                   = "mysql" 
auth.backend.mysql.host                        = "localhost" 
auth.backend.mysql.user                        = "db_user" 
auth.backend.mysql.pass                        = "db_pass" 
auth.backend.mysql.db                          = "db_name" 
auth.backend.mysql.port                        = "0" # (for default port 0, always needed)
auth.backend.mysql.socket                      = ""  # (for default leave blank, always needed)
auth.backend.mysql.users_table                 = "users_table" 
auth.backend.mysql.col_user                    = "col_name_username" 
auth.backend.mysql.col_pass                    = "col_name_password" # (md5 hash of password)
auth.backend.mysql.col_realm                   = "col_realm_name" 

configure lighttpd to use it (same as every other auth)

auth.require = ( "/some_path" =>
    (
        "method"  => "basic",
        "realm"   => "some_realm",
        "require" => "some_user",
    )
)

start lighttpd

P.S. patch include more complicated setup with separate table for domains.
If you are interested please contact with me to obtain more information.

Bugs, Patches and Suggestions
Send me E-Mail: drJeckyll@@Jeckyll.net

-- drJeckyll


@


1.1
log
@lighttpd a secure, fast, compliant and very flexible web-server which
has been optimized for high-performance environments. It has a very
low memory footprint compared to other webservers and takes care of
cpu-load. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression,
URL-Rewriting and many more) make lighttpd the perfect webserver-software
for every server that is suffering load problems.

This version is patched to support:
 auth.backend = "mysql"

WWW: http://www.lighttpd.net/
WWW: http://redmine.lighttpd.net/issues/752
@
text
@@

