ubuntu apache2 流量限制模块
mod-bw is an Apache 2 module provided to solve the problem of limiting users’ and virtual hosts’ bandwidth usage. The current versions can set virtual hosts’ and users’ bandwidth quotas, maximal download speed, requests-per-second speed and the maximal number of simultaneous IP connections.
mod-bw Features:
* Lightweight bandwidth limiting module for Apache2
* per-user bandwidth limiting
* per-virtual host bandwidth limiting
* per-destination bandwidth limiting
Limiting:
* Bandwidth total usage (bandwidth quota)
* Maximal download speed (bandwidth throttling)
* Maximal requests-per-second speed
* Maximal simultaneous IP connections
* Support for virtual hosts
* Support for defined users
Installing mod-bw:
Open the terminal and type following command to install mod-bw
|
1
|
apt-get install libapache2-mod-bw |
Now enable the module by using the a2enmod command (from terminal):
|
1
|
sudo a2enmod bw |
Below example is showing how to place the bandwidth limit for a given virtual hosts:
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<VirtualHost *:8080> ServerName www.abc.com ServerAlias www.abc.com DocumentRoot /var/www/abc # Turn bandwidth limitation on BandwidthModule On # force limitation on every request ForceBandWidthModule On # limit to 500kB/s Bandwidth all 504800 # Setup custom error message ErrorDocument 510 /errors/maxconexceeded.html BandWidthError 510 # Limit avi and mpg extensions to 20kb/s. LargeFileLimit .avi 1 20000 LargeFileLimit .mpg 1 20000</VirtualHost>
|
ubuntu apache2 流量限制模块的更多相关文章
- apache2服务器mod_rewrite模块 开启方法[linux, ubuntu]
在UBUNTU系统中要启用mod_rewrite的方法有两种: 第一种: 在终端中执行 sudo a2enmod rewrite 指 令后,即启用了 Mod_rewrite 模块, apache2服务 ...
- Ubuntu 14 中给 APACHE2安装 SSL 模块 Enable SSL site on Ubuntu 14 LTS, Apache 2.4.7:
Ubuntu 14 中给 APACHE2安装 SSL 模块 Enable SSL site on Ubuntu 14 LTS, Apache 2.4.7: 参考 http://blog.csdn.ne ...
- 转 - ubuntu apache2下目录结构
ubuntu apache2下目录结构 原文:http://blog.csdn.net/jibcy/article/details/8060651 在Windows下,Apache的配置文件通常只有一 ...
- ubuntu apache开启重写模块
http://www.iblue.cc/2011/09/ubuntu-apache%E5%BC%80%E5%90%AF%E9%87%8D%E5%86%99%E6%A8%A1%E5%9D%97/ Ubu ...
- ubuntu apache2配置详解(含虚拟主机配置方法)
ubuntu apache2配置详解(含虚拟主机配置方法) 在Windows下,Apache的配置文件通常只有一个,就是httpd.conf.但我在Ubuntu Linux上用apt-get inst ...
- ubuntu apache2下目录结构以及重写规则
ubuntu apache2下目录结构 在Windows下,Apache的配置文件通常只有一个,就是httpd.conf.但我在Ubuntu Linux上用apt-get install apache ...
- 虚拟主机的搭建(ubuntu+apache2)
搭建环境:windows+VMware(Ubuntu)+apache2.(同一IP,不同域名) 1:在VMware的虚拟机Ubuntu下安装apache2(怎么安装百度一下就能找到): 2: apac ...
- ubuntu apache2 虚拟主机服务
ubuntu apache2 虚拟主机服务 本次配置的是一个 ip 对应多个 虚拟主机 1:先检查 ubuntu server 是否已经安装了 apache2 web服务: apache2 -v 看到 ...
- SEER流量众筹模块开发测试网络及使用文档发布
SEER利用区块链奖励机制,可解决传统体育赛事痛点,提高行业运转效率.比如提高赛事方收入,让观众自由选择想看的比赛,给予赛事众筹的参与者贡献影响力,使其获得由智能合约量化的激励等.此功能可广泛应用于包 ...
随机推荐
- javacript没有多维数组只能模拟?
为什么说javacript没有多维数组只能模拟?但是我看到是可以实现多维数组的啊!这是为什么呢?下面我们来实验下. <!DOCTYPE html> <html lang=" ...
- robotframework代码定位感悟
robotframework代码定位感悟: 在做自动化的时候,有时候还是要考虑真实的操作,考虑人为反应,网络,页面渲染,服务器处理请求的过程及数据是否真实到达响应的位置, 不能一味的按照程序的速度 去 ...
- md5校验问题
描述: 最近跟同事做数据对接,接收完数据,有个md5校验,发现总是对不上 首先把解密之后的明文直接写成变量在md5的工具类main函数执行,发现居然对上了, 然后测试环境debug接收的文件,md5加 ...
- windows禅道环境搭建
zentao官网的几个网址 http://www.zentao.net/ http://www.zentao.net/article-view-79863.html 搭建环境需要下载两个文件 1) ...
- 终端中出现While executing gem ... (Errno::EPERM) Operation not permitted - /usr/bin/pod错误的修改方法
把输入终端的sudo gem install cocoapods改为 sudo gem install -n /usr/local/bin/ cocoapods即可
- MFC实现登录对话框连接access数据库方式
编写一个简单的登录对话框 大家好,我们利用MFC编写一个简单的登录对话框.主窗体是单文档界面.程序运行的时候,先弹出一个简单的登录对话框,输入用户名和密码后主窗体显示出来. 1.开打VC++6.0.点 ...
- js函数大全(2)
原文地址:http://phperbar.blog.163.com/blog/static/162596182201032935815391/ 1.常规函数 javascript常规函数包括以下9个函 ...
- 经典.net面试题目(3)
1. asp.net中web应用程序获取数据的流程: A.Web Page B.Fill C.Sql05 D.Data Sourse E.DataGrid F.DataSet G.Selec ...
- XStream的使用方法、简单使用方法、xml的解析方法
下面介绍的是在Android Studio中的使用 Android Studio中目前支持的Xstream最高版本是xstream-1.4.7.jar,大家可以在网上下载,我的是在开源中国项目中有这个 ...
- Android onTouchEvent方法
onTouchEvent方法简介 前面已经介绍了手机键盘事件的处理方法,接下来将介绍手机屏幕事件的处理方法onTouchEvent.该方法在View类中的定义,并且所有的View子类全部重写了该方法, ...