Use BandwidthMod in Apache to limit the total bandwidth
Source: Internet
Author: User
Use BandwidthMod in Apache to limit the total Bandwidth environment: CentOSrelease5.6 + Apache2.2.22mod _ bwv0.92http: // ivn. cl/files/source/mod_bw-0.92.tgzmod_bwv0.92 documentation http://legacy.ivn.cl/files/txt/mod_ B use Bandwidth Mod in Apache to limit the total Bandwidth
Environment:
CentOS release 5.6 + Apache 2.2.22
Mod_bw v0.92
Http://ivn.cl/files/source/mod_bw-0.92.tgz
Mod_bw v0.92 documentation
Http://legacy.ivn.cl/files/txt/mod_bw-0.92.txt
Download and install:
# Wget http://ivn.cl/files/source/mod_bw-0.92.tgz
# Tar zxvf mod_bw-0.92.tgz
#/Data/apps/httpd2.2.22/bin/apxs-c-I-a mod_b1_c
Configure VirtualHost
SetEnvIfNoCase User-Agent "Googlebot" google
Order allow, deny
Allow from all
Deny from env = google
BandWidthModule On
ForceBandWidthModule On
BandWidth all 131072
Where ***Segment is used to reject the capture of Googlebot.
If the link address is not exposed, Google crawls the file for unknown reasons.
Of course, you can write it in robots.txt, but it doesn't take effect quickly.
The following two concepts (case sensitive ):
Bps (bits per second) bit/second is generally used for transmission rate
Bps (bytes per second) bytes/second is generally used for display speed
1 Byte = 8 * 1bit (1 Byte = 8 characters)
What we usually talk about is 2 m bandwidth and 10 m bandwidth, which generally refers to 10 Mbit (10 Mbps)
The unit of BandWidth in the official document: BandWidth [From] [bytes/s]
Therefore, if you want to limit the total bandwidth of a VM to 1 Mbps, then:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.