ports/51095: New port: www/mod_limitipconn
Gea-Suan Lin
gslin at netnews.NCTU.edu.tw
Thu Apr 17 16:20:13 UTC 2003
>Number: 51095
>Category: ports
>Synopsis: New port: www/mod_limitipconn
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 17 09:20:08 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Gea-Suan Lin
>Release: FreeBSD 4.8-RELEASE i386
>Organization:
>Environment:
System: FreeBSD netnews.NCTU.edu.tw 4.8-RELEASE FreeBSD 4.8-RELEASE #4: Mon Apr 7 04:42:10 CST 2003 root at netnews.NCTU.edu.tw:/usr/obj/usr/src/sys/NETNEWS i386
>Description:
This is the distribution page for the Apache module mod_limitipconn.c, which
allows web server administrators to limit the number of simultaneous downloads
permitted from a single IP address.
Why did I write this module? Well, I run an mp3 server which since its
inception was being constantly hosed by people who were trying to download
dozens of files at once. For months I scoured the Internet looking for a code
snippet that would solve this problem. The closest thing I found was this patch
against an old version of Apache, and it didn't run properly on my Linux box
(that was back then; nowadays, the patch doesn't even apply cleanly to the
Apache source tree).
Finally I gave up and decided to write something to do the job myself, and
here's the result.
WWW: http://dominia.org/djao/limitipconn.html
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# mod_limitipconn
# mod_limitipconn/Makefile
# mod_limitipconn/distinfo
# mod_limitipconn/pkg-descr
# mod_limitipconn/pkg-plist
#
echo c - mod_limitipconn
mkdir -p mod_limitipconn > /dev/null 2>&1
echo x - mod_limitipconn/Makefile
sed 's/^X//' >mod_limitipconn/Makefile << 'END-of-mod_limitipconn/Makefile'
X# New ports collection makefile for: mod_limitipconn
X# Date created: 18 April 2003
X# Whom: Gea-Suan Lin <gslin at ccca.nctu.edu.tw>
X#
X# $FreeBSD$
X#
X
XPORTNAME= mod_limitipconn
XPORTVERSION= 0.04
XCATEGORIES= www
XMASTER_SITES= http://dominia.org/djao/limit/
X
XMAINTAINER= gslin at ccca.nctu.edu.tw
XCOMMENT= Limit the number of simultaneous connections from a single client IP address
X
XBUILD_DEPENDS?= ${APXS}:${PORTSDIR}/www/apache13
XRUN_DEPENDS?= ${APXS}:${PORTSDIR}/www/apache13
X
XAPXS?= ${LOCALBASE}/sbin/apxs
X
Xdo-install:
X ${APXS} -i -A -n limitipconn ${WRKSRC}/mod_limitipconn.so
X
X.include <bsd.port.mk>
END-of-mod_limitipconn/Makefile
echo x - mod_limitipconn/distinfo
sed 's/^X//' >mod_limitipconn/distinfo << 'END-of-mod_limitipconn/distinfo'
XMD5 (mod_limitipconn-0.04.tar.gz) = 009dac6ccae20806916ec7aa61a42a1f
END-of-mod_limitipconn/distinfo
echo x - mod_limitipconn/pkg-descr
sed 's/^X//' >mod_limitipconn/pkg-descr << 'END-of-mod_limitipconn/pkg-descr'
XThis is the distribution page for the Apache module mod_limitipconn.c, which
Xallows web server administrators to limit the number of simultaneous downloads
Xpermitted from a single IP address.
X
XWhy did I write this module? Well, I run an mp3 server which since its
Xinception was being constantly hosed by people who were trying to download
Xdozens of files at once. For months I scoured the Internet looking for a code
Xsnippet that would solve this problem. The closest thing I found was this patch
Xagainst an old version of Apache, and it didn't run properly on my Linux box
X(that was back then; nowadays, the patch doesn't even apply cleanly to the
X Apache source tree).
X
XFinally I gave up and decided to write something to do the job myself, and
Xhere's the result.
X
XWWW: http://dominia.org/djao/limitipconn.html
END-of-mod_limitipconn/pkg-descr
echo x - mod_limitipconn/pkg-plist
sed 's/^X//' >mod_limitipconn/pkg-plist << 'END-of-mod_limitipconn/pkg-plist'
Xlibexec/apache/mod_limitipconn.so
END-of-mod_limitipconn/pkg-plist
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list