opnsense-ports/www/lighttpd/files
Franco Fichtner 7f2772d2ab www/lighttpd: sync with upstream
Taken from: FreeBSD
2016-05-16 11:32:11 +02:00
..
COPYING.mod_h264_streaming ports: pull in a snapshot of the FreeBSD ports tree 2014-11-09 14:03:21 +01:00
extra-patch-mysqlauth www/lighttpd: sync with upstream 2016-03-20 09:28:46 +01:00
extra-patch-nodelay ports: pull in a snapshot of the FreeBSD ports tree 2014-11-09 14:03:21 +01:00
h264_streaming.conf ports: pull in a snapshot of the FreeBSD ports tree 2014-11-09 14:03:21 +01:00
lighttpd.in ports: pull in a snapshot of the FreeBSD ports tree 2014-11-09 14:03:21 +01:00
mysql_auth.sql ports: pull in a snapshot of the FreeBSD ports tree 2014-11-09 14:03:21 +01:00
patch-configure.ac www/lighttpd: sync with upstream 2015-08-10 07:58:42 +02:00
patch-src-fdevent.h www/lighttpd: sync with upstream 2015-08-10 07:58:42 +02:00
patch-src_mod__cml__lua.c www/lighttpd: sync with upstream 2015-08-19 07:41:13 +02:00
patch-src_mod__magnet.c www/lighttpd: sync with upstream 2015-08-19 07:41:13 +02:00
patch-src_network.c www/lighttpd: sync with upstream 2016-05-16 11:32:11 +02:00
README.mysqlauth ports: pull in a snapshot of the FreeBSD ports tree 2014-11-09 14:03:21 +01:00

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