httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Kemp <...@tardis.ed.ac.uk>
Subject Keeping per-virtual host data?
Date Mon, 30 Sep 2002 21:50:13 GMT
Hi All,

  I've written a module for Apache which will limit the 
 amount of data the server may transfer in a given time
 period.  (OK that's a simplistic overview anyway ;)

  To do this I make use of the information gathered by
 mod_status, and when the data transferred goes over a
 given threshhold I cause the server to simply respond
 to all requests with a redirect.

  This works fine on a per-server basis.

  I'd like to re-code my module to work with virtual
 hosts; so I believe I need some way of keeping track of 
 the size of data which has been transferred on a 
 per-vhost basis.

  (Or failing that find another module, like mod_status,
 which contains the necessary magic which I can piggy back
 upon).

  Is this possible, and if so does anybody have a pointer
 to a method I could use?

  All of the modules I've studied seem to manage to operate
 without having per vhost static data which makes me think
 either I'm missing something obvious, or it's not possible.
 Either way I'd love to be enlightened.

  It does cross my mind that the forking may rule out persistant
 static data of the kind I want; but temporary files could be used
 I guess..

  For those who might be interested my code is online at:
   http://www.steve.org.uk/Software/mod_curb/ 

  (Just be gentle; it's my first module ;)

Steve
---
www.steve.org.uk 

Mime
View raw message