Current time: 12-23-2024, 06:23 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
gOOvER Offline
Banned

Posts: 3,561
Joined: Jul 2007
Post: #2
RE: [partial-HowTo] mod_cband
cband is a part of ispcp with an actual trunk. I don't know since when, but it's implemented and it works.
10-11-2007 01:51 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Breaki Offline
Junior Member
*

Posts: 109
Joined: Sep 2007
Reputation: 5
Post: #3
RE: [partial-HowTo] mod_cband
gOOvER Wrote:cband is a part of ispcp with an actual trunk. I don't know since when, but it's implemented and it works.

you are right, its implemented and works Wink

greetz
10-11-2007 08:31 PM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #4
RE: [partial-HowTo] mod_cband
Yes, and here is the Wiki Page about it -> http://www.isp-control.net/ispcp/wiki/howto_mod_cband Wink

Greez BeNe
10-12-2007 01:23 AM
Visit this user's website Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #5
RE: [partial-HowTo] mod_cband
All I would say is that people should usually disable or move to a protected directory the aliases set by Debian's mods-available/cband.conf which display a great amount of info about the hosts
10-12-2007 02:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
achioo Offline
Junior Member
*

Posts: 76
Joined: Nov 2006
Reputation: 0
Post: #6
RE: [partial-HowTo] mod_cband
With the current trunk do we need to manually update users to add cband or is this automatically done?
10-18-2007 01:51 AM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #7
RE: [partial-HowTo] mod_cband
I mean this is per default at 1024.
Check you Apache Config about it. There you should find it.

Greez BeNe
10-18-2007 04:16 AM
Visit this user's website Find all posts by this user Quote this message in a reply
achioo Offline
Junior Member
*

Posts: 76
Joined: Nov 2006
Reputation: 0
Post: #8
RE: [partial-HowTo] mod_cband
BeNe I know that it's default with the SVN trunk. What I'm asking is with our existing clients do we need to go into the ispcp.conf file and add their cband limits or is this automatically done for existing clients.
10-19-2007 10:47 PM
Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #9
RE: [partial-HowTo] mod_cband
what exactly do you mean?
If you have mod_cband installed and enabled the limits you set in ispCP will be used.
As simple as that
10-20-2007 05:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden Offline
Junior Member
*

Posts: 84
Joined: Jan 2008
Reputation: 0
Post: #10
RE: [partial-HowTo] mod_cband
How can i set the bandwidth throttle in the ispcp config panel?

i know i can limit the amount of bandwidth used by site, but i haven't seen any setting for the throttle (say i want a site to max out at 500kb/sec, and individual transfers at 100kb/sec)

greetings,
Rik
01-28-2008 09:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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