最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
在apache下限制每个虚拟主机的并发数
时间:2022-07-02 10:45:39 编辑:袖梨 来源:一聚教程网
下载模块:
http://www.nowhere-land.org/prog ... st_limit-0.4.tar.gz
官方网址: http://www.nowhere-land.org/programs/mod_vhost_limit/
安装:
apxs -c mod_vhost_limit.c -o /path/to/libexec/mod_vhost_limit.so
在 httpd.conf 加入:
LoadModule vhost_limit_module libexec/mod_vhost_limit.so
AddModule mod_vhost_limit.c
配置:
MaxClients 150
ExtendedStatus On
NameVirtualHost *
ServerName server1
DocumentRoot /some/where/1
MaxVhostClients 100
ServerName server2
DocumentRoot /some/where/2
MaxVhostClients 30
ServerName server3
DocumentRoot /some/where/3
其中: server1 被限制为 100 个并发线程数。
server2 被限制为 30 个并发线程数。
server3 没有被限制。
注:需 mod_status 的 ExtendedStatus On 支持!!
如超出限制的并发数在客户端就会出现503错误:
Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
--------------------------------------------------------------------------------
Apache/1.3.27 Server at server1 Port 80
在 error_log 中将会有类似以下的错误提示:
[Mon Jun 23 15:22:24 2003] [error] client access to server1 deferred, MaxVhostClients 100 exceeded
希望对大家有用!!
相关文章
- 远光84步枪怎么选 步枪选择推荐 08-13
- 远光84桃桃怎么玩 桃桃技能玩法教学 08-13
- 星痕共鸣怎么漂浮 漂浮操作方法 08-13
- 绝区零爱丽丝什么时候出 爱丽丝卡池时间一览 08-13
- 原神6.0新角色立绘 6.0新角色爆料介绍 08-13
- 七日世界自动拾取怎么设置 自动拾取开启方法 08-13