Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 2001 18:24:20 -0600 (CST)
From:      Brennan Stehling <brennan@offwhite.net>
To:        Christoph Sold <christoph.sold@server.i-clue.de>
Cc:        Jim Freeze <jim@freeze.org>, Christoph Sold <christoph.sold@server.ms-agentur.de>, "Mitchell, Jason" <jmitc2@chmc.org>, "'freebsd-questions@freebsd.org'" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Limiting number of downloads per user in Apache??
Message-ID:  <Pine.BSF.4.21.0101111758500.67383-100000@home.offwhite.net>
In-Reply-To: <3A5E4812.B7A63C7E@i-clue.de>

next in thread | previous in thread | raw e-mail | index | archive | help
I am working on a set of perl modules which will create sessions for use
with apache.  I could add another module easily monitor transfers so you
can count up how many are being downloaded per session, which is set with
a single user id (a cookie).  That part actually works, I am now building
an infrastructure which is easy to use and also adding POD formatted
documentation to explain how it works.

If you have mod_perl running with your apache server I can give you
instructions on how to have it set up in minutes.  If you are not and do
not want mod_perl in your regular apache binary you can run another apache
server on another port or ip with mod_perl just for controlling access to
downloads.

What you will need is mod_perl with apache and mysql.  From there the
modules will be controlled through your server configuration.  It could
also work with postgres, but some of my SQL may need to be adjusted.  I
use DBI so the change will not have to much.  As I browse the PostgreSQL
website it appears the data types I am using are the same.  (varchar)

I am calling my set of modules ApacheTK or Apache Toolkit.  Eventually
once enough of it is done I will be releasing it to CPAN as a bundle so it
will install easily.  It is also designed for multiple virtual
servers.  You just need to tell it what database to talk with in the
httpd.conf.

I will be installing it on GreasyDaemon.com eventually so I can provide
some customized features, perhaps allowing people to post their own notes
to the site or even save search parameters for repeat use.

But your needs provide a good project for me to work on this module.  Let
me know if you are interested.  I estimate it would only take me an hour
to write up the initial module for your situation and a little time to
test it.  I could then include this MaxDownload routine as a module in the
toolkit.

And if anyone is interested, ApacheTK could be converted to C.  It is
really quite simple.  I am just having a problem getting my little module
installing with Apache.

Brennan Stehling - web developer and sys admin
projects: www.greasydaemon.com | www.onmilwaukee.com | www.sncalumni.com

The smell draws you in... snap!  There goes your nose.  Land Shark!


On Fri, 12 Jan 2001, Christoph Sold wrote:

> 
> 
> Jim Freeze schrieb:
> > 
> > With php you can track a visitors ip with $REMOTE_ADDR.
> > This should identify the user, even with multiple windows open.
> 
> This will break all users surfing through an http application proxy:
> even if there are millions of users behind it, it will show only one
> connection to the outside. Don't know if AOL or Compuserve still use
> that scheme, T-Online (German Telekom) still does.
> 
> Just my EUR .02
> -Christoph Sold
> 
> > On Fri, 12 Jan 2001, Christoph Sold wrote:
> > >
> > > "Mitchell, Jason" schrieb:
> > > >
> > > > Anyone have any luck with limiting the number of connections or downloads
> > > > allowed per user/visitor on a web site served by Apache?  I'm running 1.3.12
> > > > and getting these people that open up 10-20 downloads all at once, pretty
> > > > much consuming my bandwidth.  I'd like to limit it down to 2-3 per user.
> > > > The MaxClients directive won't work, of course, as that will lock everyone
> > > > out once the max is hit.
> > >
> > > There is no clean way to do such a thing. Http is a connectionless
> > > protocol, thus you cannot count how much connections are linked to a
> > > particular client. Also keep in mind the gazillion of surfers connected
> > > through single gateways (AOL, Compuserve,...).
> > >
> > > You may try any form of session tracking, but this will limit only the
> > > dumb user -- some more intelligent people will launch another instance
> > > of their browser, or even use another window to get another connection.
> > >
> > > Just my .02 EUR
> > > -Christoph Sold
> > >
> > >
> > > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > > with "unsubscribe freebsd-questions" in the body of the message
> > >
> > 
> > ====================================================
> > Jim Freeze
> > jim@freeze.org
> > ---------------------------------------------------
> > ** http://www.freeze.org **
> > ====================================================
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
> 




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0101111758500.67383-100000>