The current version can set virtual hosts' and users' bandwidth quotas, maximal download speed, requests-per-second speed and the maximal number of simultaneous IP connections.
More information on mod_cband can be found at http://codee.pl/cband.html
In order to compile mod_cband, we must have apxs installed.
# yum install httpd-devel
Download and install mod_cband.
# cd /tmp
# wget http://cband.linux.pl/download/mod-cband-0.9.7.5.tgz
# tar xzvf mod-cband-0.9.7.5.tgz
# cd mod-cband-0.9.7.5
# ./configure
# make
# make install
This should have added the mod_cband module to /etc/httpd/conf/httpd.conf. To confirm this run:
# vi /etc/httpd/conf/httpd.conf
You should see something like this:
LoadModule cband_module /usr/lib/apache/mod_cband.so
Restart Apache
# /etc/init.d/httpd restart
mod_cband is now installed.
To improve performance of mod_cband add the following two lines to your httpd.conf directly under where the module is listed.
CBandScoreFlushPeriod 1
CBandRandomPulse On
Now it's time to start throttling the bandwidth and limiting connections.
First lets create the score board to keep track of connections.
# mkdir /home/YourUser/domains/yourwebsite.com/public_html/scoreboard
# chown apache:apache /home/YourUser/domains/yourwebsite.com/public_html/scoreboard/
On DirectAdmin servers the vurtual hosts files are located at: /usr/local/directadmin/data/users/YourUser/httpd.conf
Edit the httpd.conf of the of the user you wish to limit the speeds or connections of.
# vi /usr/local/directadmin/data/users/YourUser/httpd.conf
Edit the httpd.conf to look similar to this:
<VirtualHost 111.222.333.444:80>
ServerName www.yourwebsite.com
ServerAlias www.yourwebsite.com yourwebsite.com
ServerAdmin webmaster@yourwebsite.com
DocumentRoot /home/YourUser/domains/yourwebsite.com/public_html
CBandSpeed 10mbps 10 30
CBandRemoteSpeed 5mbps 3 3
CBandScoreboard /home/YourUser/domains/yourwebsite.com/public_html/scoreboard
<Location /cband-status>
SetHandler cband-status
</Location>
<Location /cband-status-me>
SetHandler cband-status-me
</Location>
The CBandSpeed directive limits the overall Apache performance for the www.yourwebsite.com vhost to a speed of 10mbps, max. 10 requests per second and max. 30 open connections.
The CBandRemoteSpeed is like the CBandSpeed directive, but it sets limits for any individual user (as compared to the overall settings made by CBandSpeed).
After your changes, you must restart Apache.
You can now view the bandwidth usage and open connections for www.yourwebsite.com by going to http://www.yourwebsite.com/cband-status
You can use the following units in the mod_cband directives:
Transfer speeds:
* kbps: 1024 bits per second
* Mbps: 1024*1024 bits per second
* Gbps: 1024*1024*1024 bits per second
The default is kbps.
Transfer quotas:
* K: 1000 bytes
* M: 1000*1000 bytes
* G: 1000*1000*1000 bytes
* Ki: 1024 bytes
* Mi: 1024*1024 bytes
* Gi: 1024*1024*1024 bytes
The default is K.
Time periods:
* S: seconds
* M: minutes
* H: hours
* D: days
* W: weeks
The default is S.
آموزش نصب و کانفیگ مجازی ساز kvm
آموزش نصب VNC در Centos
آشنایی با 5 پلاگین کاربردی Nginx در وردپرس
آموزش نصب و فعالسازی SSL در سرورهای Cpanel
آموزش دانلود یک پوشه از یک سرور Remote
آموزش افزایش و بالا بردن امنیت WHMCS
آموزش ساخت صفحات اضافی در WHMCS
آشنایی با 15 دستور کاربردی در آنتی شل maldet
آموزش نصب و کانفیگ ftp سرور در CentOS 7
آموزش نصب phpmyadmin در nginx
آموزش نصب کلود لینوکس CloudLinux
آموزش تغییر IP و Hostname در Centos
آموزش شناسایی و حذف CryptoPHP PHP malware
آموزش افزایش امنیت سایت های جوملا Joomla
آموزش نصب Virtualizor روی centos 6.5
آشنایی با انواع Raid در سرور
آموزش نصب و کانفیگ php-fpm در دایرکت ادمین directadmin
آموزش نصب Spamassassin در دایرکت ادمین
آموزش خاموش کردن brute force notification
آموزش تنظیم mysql remote در دایرکت ادمین
سرویس کانفیگ ویژه امنیتی سرور
دستورالعمل جديد فعاليت سايت هاي چت روم
درباره پی سی سرور
تعطیلی 4 روزه بخش پشتیبانی
فروش ویژه سرورهای مجازی قدرتمند مختص چت روم های پربازدید
فروش ویژه سرور مجازی VPS بصورت مدیریت شده
خدمات مانیتورینگ و نگهداری و رفع اشکال سرور
کانفیگ سرورهای دایرکت ادمین
کانفیگ سرورهای سی پنل
اطلاعیه مهم: مدیران سایت های چت روم بخوانند
سیستم مدیریت محتوای سایت های عکس
راه اندازی سامانه پشتیبانی آنلاین پی سی سرور
سوء استفاده افراد کالاه بردار سود جو از نام پی سی پارسی
شروع بکار مجدد بخش پشتیبانی
تعطیلی 1 هفته ای بخش پشتیبانی بدلیل تغییر مکان شرکت
سیستم مدیریت محتوای سایت های تفریحی
سوء استفاده گروه سود جو "TopazVPS" گول نخورید
قوانین سرویس دهی پی سی سرور
طراحی چت روم
حفره امنیتی خطرناک در wordpress