سلام من می خوام تو centos 5.9 و آپاچی محدودیت دانلود نصب کنم
ماژول هم مشخصه و httpd-devel هم نصب کردم مخصوص نسخه 5.9 centos از این لینک
کد:
ftp://fr2.rpmfind.net/linux/centos/5.9/updates/i386/RPMS/httpd-devel-2.2.3-76.el5.centos.i386.rpm
تا قسمت خط چهارم که مشخص کردم cd mod_bw میره تو روت ولی بعد دستور apxs -i -a -c mod_bw.c گیر می کنه و میگه -bash: apxs: command not found تو نت هم چرخ زدم این نصب apxs تو centos چیزی پیدا نکردم باید چی کار کرد
Home Page: http://ivn.cl/files/source/mod_bw-0.8.tgz
System /. OS : CentOS 5
You will need httpd-devel should be installed.
کد:
cd ~
wget http://ivn.cl/files/source/mod_bw-0.8.tgz
tar xzf mod_bw-0.8.tgz
cd mod_bw
apxs -i -a -c mod_bw.c
chmod 755 /usr/lib/httpd/modules/mod_bw.so
[activating module `bw' in /etc/httpd/conf/httpd.conf]
You should be able to see the LoadModule command in your httpd.conf .
You can restart apache at this time.
# grep bw /etc/httpd/conf/httpd.conf
LoadModule bw_module /usr/lib/httpd/modules/mod_bw.so
service httpd restart
In your Virtual Host section:-
I want to restrict all downloads of files larger than 500kb, to a speed of 50kb/s.
<VirtualHost *:80>
BandwidthModule On
ForceBandWidthModule On
# Unlimited Bandwidth for all (except for large files, see below):-
BandWidth all 0
# No one should be able to open more than 5 simultaneous connections at one time :-
MaxConnection all 5
# Limit files greater than 500kb to 50kb/s :-
LargeFileLimit * 500 50000
ServerAdmin webmaster@yourdomain.com
DocumentRoot /var/www/vhosts/yourdomain.com/httpdocs
ServerName yourdomain.com
ServerAlias ftp.yourdomain.com www.yourdomain.com
...
...
Time to restart Apache web service.
service httpd restart