-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
82 lines (52 loc) · 2.26 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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.