À´×Ôhttp://www.allabc.com
ÂÛ̳£ºhttp://seecee.dev-c.nl/forumdisplay.php?fid=4
ÏÂÔØÄ£¿e£º
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 ¼ÓÈe£º
LoadModule vhost_limit_module libexec/mod_vhost_limit.so
AddModule mod_vhost_limit.c
ÅaÖãº
MaxClients 150
ExtendedStatus On
NameVirtualHost *
<VirtualHost *>
ServerName server1
DocumentRoot /some/where/1
MaxVhostClients 100
<VirtualHost *>
ServerName server2
DocumentRoot /some/where/2
MaxVhostClients 30
<VirtualHost *>
ServerName server3
DocumentRoot /some/where/3
ÆaÖУº server1 ±»ÏÞÖÆΪ 100 ¸o²¢¢Ïß³ÌÊý¡£ server2 ±»ÏÞÖÆΪ 30 ¸o²¢¢Ïß³ÌÊý¡£ server3 ûÓб»ÏÞÖÆ¡£
×¢£ºÐe mod_status µÄ ExtendedStatus On Ö§³Ö£¡£¡
È糬³oÏÞÖƵIJ¢*¢ÊýÔÚ¿Í»§¶Ë¾Í»a³oÏÖ503´iÎo£º
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 Öн«»aÓÐÀaËÆÒÔϵĴiÎoÌaʾ£º
[Mon Jun 23 15:22:24 2003] [error] client access to server1 deferred, MaxVhostClients 100 exceeded
Ï£Íu¶Ô´o¼ÒÓÐÓã¡£¡ £¨³o´¦£ºhttp://www.allabc.com£(C)