Results 1 to 1 of 1
-
16th Jun 2014, 12:44 PM #1
Installing mod_bandwidth For the Ultimate in Apache Utilization Control
"Mod_bandwidth" is a module for the Apache webserver that enables the setting of server-wide or per connection bandwidth limits, based on the directory, size of files and remote IP/domain. Installing this module involves a number of steps, but it is fairly simple to accomplish.
Reprints and reposting of this article is NOT AUTHORIZED without the express consent of the author. Permission to link to this article from other locations is hereby granted.
SSH into your server as root and perform the following:
Code:mkdir /root/modbw cd modbw wget ftp://ftp.cohprog.com/pub/apache/module/1.3.0/mod_bandwidth.c /usr/local/apache/bin/apxs -c /root/mbw/mod_bandwidth.c -o /usr/local/apache/libexec/mod_bandwidth.so (The above is all one command) mkdir /usr/local/apache/apachebw mkdir /usr/local/apache/apachebw/link mkdir /usr/local/apache/apachebw/master chown nobody:nobody -R /usr/local/apache/apachebw pico /etc/httpd/conf/httpd.conf
LoadModule rewrite_module libexec/mod_rewrite.so
And BEFORE that line, add this:
LoadModule bandwidth_module libexec/mod_bandwidth.so
Then locate the line that looks like this:
AddModule mod_env.c
AddModule mod_bandwidth.c
Then locate the line that looks like this:
# Document types.
BandWidthDataDir "/usr/local/apache/apachebw"
BandWidthModule On
domain you wish to limit and just BEFORE the </virtualhost> line, add
this:
BandWidthModule On
BandWidth all 512
bytes per second.
Save the httpd.conf file.
Code:service httpd restart
Code:cd /usr/sbin
Code:wget ftp://ftp.cohprog.com/pub/apache/module/cleanlink.pl
Code:chmod 755 cleanlink.pl
Code:pico cleanlink.pl
Code:$LINKDIR="/usr/local/apache/apachebw/link";
Code:perl cleanlink.pl
Code:pico /etc/rc.d/rc.local
# Launch Cleanlink for mod_bandwidth
Code:perl /usr/sbin/cleanlink.pl
There is actually a lot more you can do with this module than simply limiting the bandwidth rates. You can limit the number of connections, file sizes and more. I encourage you to read the documentation located here for all the deatils of everything you can sutomize with this module.Areon Reviewed by Areon on . Installing mod_bandwidth For the Ultimate in Apache Utilization Control "Mod_bandwidth" is a module for the Apache webserver that enables the setting of server-wide or per connection bandwidth limits, based on the directory, size of files and remote IP/domain. Installing this module involves a number of steps, but it is fairly simple to accomplish. Reprints and reposting of this article is NOT AUTHORIZED without the express consent of the author. Permission to link to this article from other locations is hereby granted. SSH into your server as root and Rating: 5
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[Hiring] Need Some to Install The Script in my server For 2$
By Trusteduploader in forum Completed TransactionsReplies: 1Last Post: 5th Mar 2011, 12:40 PM -
US Senator proposes a 'kill switch' for the Internet in new bill
By bxflow in forum General DiscussionReplies: 3Last Post: 25th Jun 2010, 11:42 AM -
Moderators required for The Music in .com
By Themusicin in forum Site ReviewsReplies: 4Last Post: 27th Feb 2010, 09:38 AM -
In it for the money?
By GeeZus in forum Webmaster DiscussionReplies: 32Last Post: 13th Aug 2009, 03:59 PM -
Warez Sites - In it for money, or just for the hell of it?
By Sp32 in forum General DiscussionReplies: 10Last Post: 20th Jul 2009, 08:43 AM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...