Current time: 04-27-2024, 08:43 AM Hello There, Guest! (LoginRegister)


Post Reply 
[partial-HowTo] mod_cband
Author Message
achioo Offline
Junior Member
*

Posts: 76
Joined: Nov 2006
Reputation: 0
Post: #1
[partial-HowTo] mod_cband
First off this how to is incomplete, is currently only setup for Debian, and is made for apache2.*.

  1. su root or sudo (recommended) apt-get install apache2-prefork-dev
  2. cd /tmp
  3. wget http://cband.linux.pl/download/mod-cband-0.9.7.4.tgz
  4. tar -zxf mod-cband-0.9.7.4.tgz
  5. ./configure
  6. make
  7. make install
  8. user your favorite text editor to open /etc/apache2/httpd.com to make sure that the following line is there...
    LoadModule cband_module /usr/lib/apache2/modules/mod_cband.so
  9. now restart or reload apache
  10. now you just need to edit your /etc/apache2/sites-available/ispcp.conf and update the virtual hosts directives with their limits.
  11. when finished editing the virtual hosts just restart or reload apache and you're good to go.


The following is an example
Code:
# specify default 'bandwidth exceeded' location
CBandDefaultExceededURL    http://haha.org/bandwidth_exceeded.html

<VirtualHost *:80>
    DocumentRoot /var/www/xyz.org/
    ServerName xyz.org
    CustomLog /var/log/apache2/xyz.org.access combined
    ErrorLog /var/log/apache2/xyz.org.access.error
    RewriteEngine On
    RewriteOptions inherit

    # 100MB virtualhost bandwidth limit
    CBandLimit 100000

    # redirect to http://abc.org/bandwidth_exceeded.html
    # when the limit has been reached
    CBandExceededURL http://abc.org/bandwidth_exceeded.html

    # virtualhost's scoreboard file
    CBandScoreboard /var/run/apache2/xyz.org.scoreboard
    
    # a period of time after which the scoreboard will be cleared (30 days)
    # (only in >=0.9.5-rc2)
    CBandPeriod 30D
</VirtualHost>

References for this howto are from http://cband.linux.pl/documentation and http://easytouch.com/mod-cband-debian-in...speedlimit.

If anyone has an easy way to implement this for new accounts/current accounts and would like it to be added please let me know and I'll update this HowTo. That's about the only thing that's missing.
(This post was last modified: 10-11-2007 11:22 AM by achioo.)
10-11-2007 11:11 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
[partial-HowTo] mod_cband - achioo - 10-11-2007 11:11 AM
RE: [partial-HowTo] mod_cband - gOOvER - 10-11-2007, 01:51 PM
RE: [partial-HowTo] mod_cband - Breaki - 10-11-2007, 08:31 PM
RE: [partial-HowTo] mod_cband - BeNe - 10-12-2007, 01:23 AM
RE: [partial-HowTo] mod_cband - raphael - 10-12-2007, 02:22 PM
RE: [partial-HowTo] mod_cband - achioo - 10-18-2007, 01:51 AM
RE: [partial-HowTo] mod_cband - BeNe - 10-18-2007, 04:16 AM
RE: [partial-HowTo] mod_cband - achioo - 10-19-2007, 10:47 PM
RE: [partial-HowTo] mod_cband - raphael - 10-20-2007, 05:37 AM
RE: [partial-HowTo] mod_cband - psygarden - 01-28-2008, 09:46 PM
RE: [partial-HowTo] mod_cband - raphael - 01-29-2008, 02:00 AM
RE: [partial-HowTo] mod_cband - DaSilva - 03-28-2008, 03:06 AM
RE: [partial-HowTo] mod_cband - BeNe - 03-28-2008, 03:38 AM
RE: [partial-HowTo] mod_cband - xclanet - 04-26-2008, 08:52 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)