jeffery
Verified User
- Joined
- Jan 13, 2004
- Messages
- 177
************************************
Mini-Howto on installing Mod_BandWidth
Version 2.0.5
Date : 23 July 2004
Tested on Redhat 9
************************************
Step 1 - Download mod_bandwidth
#cd /usr/local/directadmin/customapache (You may change this)
#wget ftp://ftp.cohprog.com/pub/apache/module/1.3.0/mod_bandwidth.c
Step 2 - APXS Compilation
#/usr/sbin/apxs -c ./mod_bandwidth.c -o /etc/httpd/modules/mod_bandwidth.so
Step 3 - Link Directory
#mkdir /tmp/apachebw
#mkdir /tmp/apachebw/link
#mkdir /tmp/apachebw/master
#chown -R apache:apache /tmp/apachebw
Step 4 - Modify Apache Conf
#vi /etc/httpd/conf/httpd.conf
Place those lines in whatever place you want:
<IfModule mod_bandwidth.c>
BandWidthDataDir /tmp/apachebw
BandWidthModule On
</IfModule>
Step 5 - Customize Virtual Host Limitation
You may now customize each virtual host's httpd.conf located in
/usr/local/directadmin/data/user/{username}/
by adding "BandWidthModule On" (without quotes) in each <VirtualHost>, and mod_bandwidth tag like "BandWidth" inside <Directory> tag.
Step 6 - Do a safe apache restart
#service httpd restart
OK! You may now upload a huge file (enough to test) to a dummy site that you limited to test.

Mini-Howto on installing Mod_BandWidth
Version 2.0.5
Date : 23 July 2004
Tested on Redhat 9
************************************
Step 1 - Download mod_bandwidth
#cd /usr/local/directadmin/customapache (You may change this)
#wget ftp://ftp.cohprog.com/pub/apache/module/1.3.0/mod_bandwidth.c
Step 2 - APXS Compilation
#/usr/sbin/apxs -c ./mod_bandwidth.c -o /etc/httpd/modules/mod_bandwidth.so
Step 3 - Link Directory
#mkdir /tmp/apachebw
#mkdir /tmp/apachebw/link
#mkdir /tmp/apachebw/master
#chown -R apache:apache /tmp/apachebw
Step 4 - Modify Apache Conf
#vi /etc/httpd/conf/httpd.conf
Place those lines in whatever place you want:
<IfModule mod_bandwidth.c>
BandWidthDataDir /tmp/apachebw
BandWidthModule On
</IfModule>
Step 5 - Customize Virtual Host Limitation
You may now customize each virtual host's httpd.conf located in
/usr/local/directadmin/data/user/{username}/
by adding "BandWidthModule On" (without quotes) in each <VirtualHost>, and mod_bandwidth tag like "BandWidth" inside <Directory> tag.
Step 6 - Do a safe apache restart
#service httpd restart
OK! You may now upload a huge file (enough to test) to a dummy site that you limited to test.
