-
Notifications
You must be signed in to change notification settings - Fork 0
Apache module to calculate disk space used by each VirtualHost.
License
stratus/mod-dirsize
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
mod-dirsize ----------------- Introduction ------------ mod-dirsize is a module for Apache 1.x to calculate the disk space used by each VirtualHost based on its DocumentRoot. The result is given in kb encapsulated in a valid XML file. Roadmap ------- mod_dirsize 0.2 - Apache 2 support Better debug output W3C HTML and XML if possible mod_dirsize 0.3 - Remove ap_bspawn() call adding better code to calculate the space used (a "libdu" would be awesome). Configuration ------------- To include this module in your server, follow the steps below: 1. Install the module in /usr/lib/apache/1.3/ or your Apache libraries directory (if you are unsure search for mod_env.so). 2. Place the configuration line below into your /etc/apache/modules.conf (Debian/Ubuntu) or together with Module or AddModule directives in your own Apache configuration file. For Apache 1.2: Module dirsize_module <libraries_dir>/mod_dirsize.so For Apache 1.3: LoadModule dirsize_module <libraries_dir>/mod_dirsize.so 3. Reload your Apache (/etc/init.d/apache reload), check if it was really reloaded (ie.: look at your global log files). 4. Add in your Apache configuration file, outside any <VirtualHost> directive: <Location /dirsize> SetHandler mod_dirsize </Location> 5. Reload your Apache again doing the same sanity checks. 6. Go to your web browser and check http://hostname/dirsize . You may want to do http://anyvirtualhost/dirsize as well. Security -------- The <Location> directive above does NOT set any authentication for that URL. You may restrict the access by yourself! I recommend something like IP based authentication as follows: <Location /dirsize> SetHandler mod_dirsize order deny,allow deny from all allow from <paste your ip here> </Location> Please note you must change <paste your ip here>. Notes ----- You are free to change <Location /dirsize> for <Location /anything> if you want, but the "SetHandler mod_dirsize" must be untouched otherwise it won't work. Thanks ------ Carlos Laviola, Paulo Sousa and Rodrigo Afonso.
About
Apache module to calculate disk space used by each VirtualHost.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published