diff options
author | Anders Nordby <anders@FreeBSD.org> | 2001-11-12 03:24:59 +0000 |
---|---|---|
committer | Anders Nordby <anders@FreeBSD.org> | 2001-11-12 03:24:59 +0000 |
commit | 05cc414626152ff41f32cfff6b1f8af979e6ea08 (patch) | |
tree | e92b22a9080357c77a9e4b91df99fd2e53ec2c24 /www/mod_mysqluserdir/files | |
parent | Add mod_mylo, a module for Apache that sends logs directly to a MySQL database (diff) |
Add mod_mysqluserdir, an Apache module to make Apache get userdirs from MySQL.
PR: 31577
Approved by: will
Notes
Notes:
svn path=/head/; revision=49956
Diffstat (limited to 'www/mod_mysqluserdir/files')
-rw-r--r-- | www/mod_mysqluserdir/files/README | 45 | ||||
-rw-r--r-- | www/mod_mysqluserdir/files/patch-mod_mysqluserdir.c | 10 |
2 files changed, 55 insertions, 0 deletions
diff --git a/www/mod_mysqluserdir/files/README b/www/mod_mysqluserdir/files/README new file mode 100644 index 000000000000..eec557aa4a09 --- /dev/null +++ b/www/mod_mysqluserdir/files/README @@ -0,0 +1,45 @@ +Notes from the author: +====================== + +Modified by Jaanus Toomsalu for using MYSQL userdirs +03. Sept. 2001 +Configuration options + MyUserDirHost localhost - Mysql database host + MyUserDirSock /var/run/mysql/mysql.sock - Mysql Unix filesocket + if not present then database host option will be used + MyUserDirUser user - DB User + MyUserDirPass pass - DB User password + MyUserDirDB database _ DB name + MyUserDirTable table - DB table name + MyUserDirDirCol directory - directory column name + MyUserDirUserCol login - login column name + #MyUserDirLeftJoinCol - if needed + MyUserDirWhereCol "and enabled=1" + +Notes from Anders: +================== + +The module is successfully tested with this configuration: + +MyUserDirSock /tmp/mysql.sock +MyUserDirUser sqluserdir +MyUserDirPass foo +MyUserDirDB sqlusers +MyUserDirTable sqlusers +MyUserDirDirCol directory +MyUserDirUserCol user + +I had to disable the LoadModule and AddModule commands for the default Apache +mod_userdir to make mod_mysqluserdir work. + +And a MySQL table crated like this: + +CREATE TABLE sqlusers ( + id int(13) NOT NULL auto_increment, + user varchar(50) NOT NULL default '', + directory varchar(50) NOT NULL default '', + enabled tinyint(3) NOT NULL default '1', + PRIMARY KEY (id) +); + +INSERT INTO sqlusers VALUES (1,'anders','/home/anders',1); diff --git a/www/mod_mysqluserdir/files/patch-mod_mysqluserdir.c b/www/mod_mysqluserdir/files/patch-mod_mysqluserdir.c new file mode 100644 index 000000000000..32e3c2f30783 --- /dev/null +++ b/www/mod_mysqluserdir/files/patch-mod_mysqluserdir.c @@ -0,0 +1,10 @@ +--- mod_mysqluserdir.c.orig Sun Oct 28 14:08:24 2001 ++++ mod_mysqluserdir.c Sun Oct 28 14:08:53 2001 +@@ -614,7 +614,6 @@ + + if (sql_row=mysql_fetch_row(result)) { + values=sql_row[0]; +- mysql_free_result(result); + } + + else |