README for mod_quota Latest version available from: http://www.meridian.net.au/Code/mod_quota/ mod_quota - Web Page Quota Module For Apache -------------------------------------------- Introduction ------------ This is a module that implements a basic quota system for the Apache web server. Access to web sites can be denied based on a file containing a list of user ID's and/or directories Installation ------------ To include this module in your server, follow the steps below: 1. Install the module in src/modules/mod_quota. 2. Place the configuration line below into your src/Configuration file. This line should be placed above the userdir_module. For Apache 1.2: Module mod_quota_module modules/ozquota/mod_quota.o For Apache 1.3: AddModule modules/mod_quota/mod_quota.o 3. Run the src/Configure script ("cd src; ./Configure"). This will build the Makefile for the server itself, and update the src/modules/Makefile for any additional modules you have requested from beneath that subdirectory. 4. Make the server (run "make" in the src directory). Configuration ------------- There are three directives available: Quota On|Off - Enables/disables quota module. Default: Off QuotaFile - File that contains quota info QuotaCutoff - Minimum hits and bytes threshold. Only ad directory to quota list if hits is greater than cutoff. Useful to trim large quota files. Configuration file format: An example configuration file is give below. # This is a comment # Blank lines are ignored # User names must start with a ~ character # All other lines are considered directories relative to ServerRoot # 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: - /directory1 will not be blocked on hits or bytes. - /directory2 will be blocked on hits. - ~user1 will be blocked on bytes. - ~user2 will be blocked on hits and bytes. mod_quota handler: 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. You can then point your browser to http://server.foo.com/mod_quota-info SetHandler mod_fquota-handler order deny,allow deny from all allow from server.foo.com Bugs/Suggestions ---------------- Any bugs, problems, suggestions can be directed to me at http://www.meridian.net.au/Contact/ - April, 2003