Post Reply  Post Thread 
Pages (2): « First [1] 2 Next > Last »
[partial-HowTo] mod_cband
Author Message
achioo
Junior Member
*


Posts: 73
Group: Registered
Joined: Nov 2006
Status: Offline
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
Documentation Team
***
Docu Team

Posts: 1,283
Group: Docu Team
Joined: Jul 2007
Status: Offline
Reputation: 11
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.


OS : Debian 4.0 Etch 64bit
ispCP Version : RC6 r1257 - 01.07.08 (NightlyBuild)
Activated : AWStats dynamic
Mods : none
->SmileThis Signature is OpenSourceSmile<-
10-11-2007 01:51 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Breaki
Junior Member
****
Dev Team

Posts: 109
Group: Dev Team
Joined: Sep 2007
Status: Offline
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
Moderator
*****


Posts: 2,557
Group: Moderators
Joined: Jan 2007
Status: Offline
Reputation: 35
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




:: ispCP Omega RC5 Live Demo - r1267 (19.05.08) --> http://www.isp-control.net/forum/ispcp-o...ml#pid2169 <--
10-12-2007 01:23 AM
Visit this user's website Find all posts by this user Quote this message in a reply
raphael
Member
****
Dev Team

Posts: 474
Group: Dev Team
Joined: Apr 2007
Status: Offline
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


YaHost Me | Text Link Ads | my Debian repository | Donate! | No OOXML! | Project HoneyPot | ... and more

Quote:
This is Linux land. In silent nights you can hear the Windows machines rebooting.

If you want to be helped, don't PM me but post in the forums | If you want private support PM me and we'll discuss the price

10-12-2007 02:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
achioo
Junior Member
*


Posts: 73
Group: Registered
Joined: Nov 2006
Status: Offline
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
Moderator
*****


Posts: 2,557
Group: Moderators
Joined: Jan 2007
Status: Offline
Reputation: 35
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




:: ispCP Omega RC5 Live Demo - r1267 (19.05.08) --> http://www.isp-control.net/forum/ispcp-o...ml#pid2169 <--
10-18-2007 04:16 AM
Visit this user's website Find all posts by this user Quote this message in a reply
achioo
Junior Member
*


Posts: 73
Group: Registered
Joined: Nov 2006
Status: Offline
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
Member
****
Dev Team

Posts: 474
Group: Dev Team
Joined: Apr 2007
Status: Offline
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


YaHost Me | Text Link Ads | my Debian repository | Donate! | No OOXML! | Project HoneyPot | ... and more

Quote:
This is Linux land. In silent nights you can hear the Windows machines rebooting.

If you want to be helped, don't PM me but post in the forums | If you want private support PM me and we'll discuss the price

10-20-2007 05:37 AM
Visit this user's website Find all posts by this user Quote this message in a reply
psygarden
Junior Member
*


Posts: 84
Group: Registered
Joined: Jan 2008
Status: Offline
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


It's hard to argue with the government. Remember, they run the Bureau of Alcohol, Tobacco and Firearms, so they must know a thing or two about satisfying women.
01-28-2008 09:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Pages (2): « First [1] 2 Next > Last »
Post Reply  Post Thread 

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump:

| All rights reserved : isp-control.net |