I am still noob in all this but I am learning..
I want to limit bandwdith per connection on server.
I found --> http://www.hostlibrary.com/Installingmod_bandwidthFortheUltimateinApacheUtilizationControl-544.html
But I am stucked at few places..
Basically.. kindly guide me how I can make it working for my CentOS 4.x with DA .
Where is /usr/local/apache/bin
in centOs 4x running DA ?
Also, which which one is /usr/local/apache/libexec/
I want to limit bandwdith per connection on server.
I found --> http://www.hostlibrary.com/Installingmod_bandwidthFortheUltimateinApacheUtilizationControl-544.html
But I am stucked at few places..
Basically.. kindly guide me how I can make it working for my CentOS 4.x with DA .
In short ..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
I am unable to find such directory, kindly tell whre are these in terms of DA ?
(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
Find the line that looks like this:
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
and BEFORE that line, add this:
AddModule mod_bandwidth.c
Then locate the line that looks like this:
# Document types.
And BEFORE that line add this:
BandWidthDataDir "/usr/local/apache/apachebw"
BandWidthModule On
Then to enable it on a virtual host, locate the virtualhost entry for the
domain you wish to limit and just BEFORE the </virtualhost> line, add
this:
BandWidthModule On
BandWidth all 512
The 512 can be replaced with whatever rate you want to limit it to in
bytes per second.
Save the httpd.conf file.
service httpd restart
cd /usr/sbin
wget ftp://ftp.cohprog.com/pub/apache/module/cleanlink.pl
chmod 755 cleanlink.pl
pico cleanlink.pl
Change $LINKDIR as follows:
$LINKDIR="/usr/local/apache/apachebw/link";
Save the file.
perl cleanlink.pl
pico /etc/rc.d/rc.local
At the end of that file add:
# Launch Cleanlink for mod_bandwidth
perl /usr/sbin/cleanlink.pl
Save that file.
Where is /usr/local/apache/bin
in centOs 4x running DA ?
Also, which which one is /usr/local/apache/libexec/