mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-22 08:58:47 +00:00
Add mod_mysqluserdir, an Apache module to make Apache get userdirs from MySQL.
PR: 31577 Approved by: will
This commit is contained in:
parent
a87a019bc0
commit
05cc414626
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=49956
@ -151,6 +151,7 @@
|
||||
SUBDIR += mod_layout
|
||||
SUBDIR += mod_mp3
|
||||
SUBDIR += mod_mylo
|
||||
SUBDIR += mod_mysqluserdir
|
||||
SUBDIR += mod_perl
|
||||
SUBDIR += mod_php3
|
||||
SUBDIR += mod_php4
|
||||
|
34
www/mod_mysqluserdir/Makefile
Normal file
34
www/mod_mysqluserdir/Makefile
Normal file
@ -0,0 +1,34 @@
|
||||
# New ports collection makefile for: mod_mysqluserdir
|
||||
# Date created: 12 November 2001
|
||||
# Whom: Anders Nordby <anders@FreeBSD.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= mod_mysqluserdir
|
||||
PORTVERSION= 0.1
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= ftp://sys.estpak.ee/pub/ \
|
||||
ftp://ftp.nuug.no/pub/anders/distfiles/
|
||||
DISTNAME= ${PORTNAME}_${PORTVERSION}
|
||||
|
||||
MAINTAINER= anders@FreeBSD.org
|
||||
|
||||
BUILD_DEPENDS= ${APXS}:${PORTSDIR}/www/apache13
|
||||
RUN_DEPENDS= ${APXS}:${PORTSDIR}/www/apache13
|
||||
LIB_DEPENDS= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
|
||||
|
||||
APXS= ${LOCALBASE}/sbin/apxs
|
||||
|
||||
do-build:
|
||||
(cd ${WRKSRC} && ${APXS} -c -I${LOCALBASE}/include \
|
||||
-L${LOCALBASE}/lib/mysql -lmysqlclient mod_mysqluserdir.c)
|
||||
|
||||
do-install:
|
||||
(cd ${WRKSRC} && ${APXS} -i -A -n 'userdir' mod_mysqluserdir.so)
|
||||
.if !defined(NOPORTDOCS)
|
||||
${INSTALL} -d -o root -g wheel -m 0755 ${DOCSDIR}
|
||||
${INSTALL_DATA} ${FILESDIR}/README ${DOCSDIR}/
|
||||
.endif
|
||||
${CAT} ${PKGMESSAGE}
|
||||
|
||||
.include <bsd.port.mk>
|
1
www/mod_mysqluserdir/distinfo
Normal file
1
www/mod_mysqluserdir/distinfo
Normal file
@ -0,0 +1 @@
|
||||
MD5 (mod_mysqluserdir_0.1.tar.gz) = 3f74bc9f8ce6959018767695c52c00c4
|
45
www/mod_mysqluserdir/files/README
Normal file
45
www/mod_mysqluserdir/files/README
Normal file
@ -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);
|
10
www/mod_mysqluserdir/files/patch-mod_mysqluserdir.c
Normal file
10
www/mod_mysqluserdir/files/patch-mod_mysqluserdir.c
Normal file
@ -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
|
1
www/mod_mysqluserdir/pkg-comment
Normal file
1
www/mod_mysqluserdir/pkg-comment
Normal file
@ -0,0 +1 @@
|
||||
An Apache module to make Apache get userdirs from MySQL
|
6
www/mod_mysqluserdir/pkg-descr
Normal file
6
www/mod_mysqluserdir/pkg-descr
Normal file
@ -0,0 +1,6 @@
|
||||
mod_mysqluserdir is a configurable Apache module for fetching
|
||||
http://server/~username type info from a MySQL database.
|
||||
|
||||
WWW: http://freshmeat.net/projects/mod_mysqluserdir/
|
||||
|
||||
- Anders Nordby <anders@FreeBSD.org>
|
19
www/mod_mysqluserdir/pkg-message
Normal file
19
www/mod_mysqluserdir/pkg-message
Normal file
@ -0,0 +1,19 @@
|
||||
************************************************************
|
||||
You've installed mod_mysqluserdir, an Apache module to make
|
||||
Apache get userdirs from MySQL.
|
||||
|
||||
Edit your apache.conf or httpd.conf to enable and setup this
|
||||
module. Have a look at the files in
|
||||
${PREFIX}/share/doc/mod_mysqluserdir for information on how
|
||||
to configure it etc.
|
||||
|
||||
You need to disable the LoadModule and AddModule commands
|
||||
for the default Apache mod_userdir module to make
|
||||
mod_mysqluserdir work.
|
||||
|
||||
Then do this to make it work effective:
|
||||
|
||||
# apachectl configtest (see if there are any config errors)
|
||||
# apachectl restart
|
||||
|
||||
************************************************************
|
5
www/mod_mysqluserdir/pkg-plist
Normal file
5
www/mod_mysqluserdir/pkg-plist
Normal file
@ -0,0 +1,5 @@
|
||||
libexec/apache/mod_mysqluserdir.so
|
||||
@exec %D/sbin/apxs -e -A -n userdir %D/%F
|
||||
@unexec %D/sbin/apxs -e -A -n userdir %D/%F
|
||||
%%PORTDOCS%%share/doc/mod_mysqluserdir/README
|
||||
%%PORTDOCS%%@dirrm share/doc/mod_mysqluserdir
|
Loading…
Reference in New Issue
Block a user