'mod_cband' Installation

Step 1

[root@localhost ~]# yum install gcc httpd-devel

Perpare the gcc compiler and apxs (apache tools in httpd-devel package)

Step 2

[root@localhost ~]# wget http://linux.alanstudio.hk/mod-cband-
[root@localhost ~]# tar xzvf mod-cband-
[root@localhost ~]# cd mod-cband-
[root@localhost ~]# ./configure
[root@localhost ~]# make
[root@localhost ~]# make install

Downloadthe tar file , compile and install the tar program of 'mod_cband'.

Direct Download: http://linux.alanstudio.hk/mod-cband-

Step 3

[root@localhost ~]# vi /etc/httpd/conf/httpd.conf

LoadModule cband_module /usr/lib/httpd/modules/mod_cband.so

Check the LoadModule of 'mod_cband' is added or not in httpd.conf

<VirtualHost *:80 *:443>
DocumentRoot /var/www/html/test
ServerName www.test.com
CBandSpeed 1024 50 100
CBandRemoteSpeed 20kb/s 3 3

<Location /cband-status>
SetHandler cband-status
<Location /cband-status-me>
SetHandler cband-status-me

Append the codes in the end of httpd.conf file.

The CBandSpeed directive limits the overall Apache performance for the www.example.com vhost to a speed of 1024kbps, max. 50 requests per second and max. 100 open connections.

The CBandRemoteSpeed is like the CBandSpeed directive, but it sets limits for any individual user. to a speed of 20kbps, max. 3 requests per second and max. 3 open connections.

[root@localhost ~]# apachectl graceful

Restart apache

Try see the cband status via the website:


P.S.: you can see more detials in our cband configuration page

Server is hosted by Alanstudio
Linux Operating System

Recommend screen resolution 1024 x 768 / IE / FireFox
Alan Studio © 2007 by Alan Cheung Hin Lun. All rights reserved.