mod_quota ‹ Code ‹ meridian.net.au
mod_quota is an Apache Web Server module which can be used to limit or quota the number of requests on a per directory basis.
The module reads a configuration file which lists the user or directory, the number of requests already made and the number of requests allowed.
The configuration file allows for bytes, but the current implementation does not impose any checks against bytes sent.
All files
mod_quota.zip [6,823 bytes]
Individual files
mod_quota.c [19,445 bytes]
Makefile.tmpl [70 bytes]
Makefile [1,888 bytes]
README.txt [2,768 bytes]
The .zip archive contains all the files you need. However, you can also download the files individually if you wish.
To include this module in your server, follow the steps below:
For Apache 1.2
Module mod_quota_module modules/ozquota/mod_quota
For Apache 1.3
AddModule modules/mod_quota/mod_quota.o
There are five configuration directives available:
An example configuration file is given below.
# This is a comment # Blank lines are ignored # User names must start with a ~ character # Other lines are directories relative to ServerRoot # Bytes are ignored - no quotas apply # Directory Hits Bytes QHits QBytes /directory1 498 334382 21000 1048576 /directory2 28957 281996 21000 1048576 ~user1 8957 3019384 21000 1048576 ~user2 56439 2155061 21000 1048576
For the next request
To view information about the mod_quota module, you need to activate the mod_quota handler by including a block similar to the following, in your srm.conf file.
<Location /mod_quota-info> SetHandler mod_quota-handler order deny,allow deny from all allow from server.foo.com </Location>
You can then point your browser to
http://server.foo.com/mod_quota-info
Contact me if you have any bugs, problems, or suggestions.