PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : نصب Mod_Throttle بر روی CPANEL



Vahid
August 8th, 2008, 17:54
This Apache module is intended to reduce the load on your server & bandwidth generated by popular virtual hosts, directories, locations, or users according to supported polices (see below) that decide when to delay or refuse requests. Also mod_throttle can track and throttle incoming connections by IP address or by authenticated remote user.
Every request now passes through four levels of throttling, which are: by client's IP address (ThrottleClientIP (http://www.snert.com/Software/mod_throttle/index.shtml#ThrottleClientIP)), by authenticated remote user name (ThrottleRemoteUser (http://www.snert.com/Software/mod_throttle/index.shtml#ThrottleRemoteUser)), by local user ID (ThrottleUser (http://www.snert.com/Software/mod_throttle/index.shtml#ThrottleUser)), and by directory, location, virtual host, or server (ThrottlePolicy (http://www.snert.com/Software/mod_throttle/index.shtml#ThrottlePolicy)).
To install with cPanel, SSH into your server as root and perform the following:
cd /usr/src
wget http://www.snert.com/Software/mod_throttle/mod_throttle312.tgz (http://www.snert.com/Software/mod_throttle/mod_throttle312.tgz)

tar zxvf mod_throttle312.tgz cd mod_throttle-3.1.2
pico Makefile
Then edit the line that reads:
APXS=apxs
And change it to read:
APXS=/usr/local/apache/bin/apxs
Save the file and then:
make
make install
service httpd restart
Usage

Best bet is to go to http://www.snert.com/Software/mod_throttle/ (http://www.snert.com/Software/mod_throttle/) and read up on all the options, but I will give you an example of limiting a site, and how to monitor all your throttled sites status.

Edit your /etc/httpd/conf/httpd.conf and locate the virtualhost entry for the site you wish to throttle. Just BEFORE the </VirtualHost> entry, insert:
<IfModule mod_throttle.c>
ThrottlePolicy Volume 10G 30d
</IfModule>
<Location /throttle-me>
SetHandler throttle-me
</Location>
The ThrottlePolicy line is the key. The first number is the amount of data and acceptable letters are G, M and K. The second number is the period and acceptable letters are m, w, d, h, and s.

Then restart Apache (service httpd restart) Now you can go to:
http://throttleddomain.com/throttle-me (http://throttleddomain.com/throttle-me)
And see the status of the throttle.

If you want to be able to see the status of all throttled sites on the server at once, go to the first virtualhost entry in your httpd.conf file (this should be the entry for your server's hostname) and add the following:
<Location /throttle-status>
SetHandler throttle-status
</Location>
Then restart Apache again, and you can go to http://host.name.com/throttle-status (http://host.name.com/throttle-status) and see the status of all throttled sites.

vPsPersia.COM
July 2nd, 2010, 18:57
لینک های دانلودشان خراب هست ، در واقع سایت سازنده درش بسته شده ، فایل هاشون رو ندارید؟

Vahid
July 2nd, 2010, 19:38
http://www.sfr-fresh.com/unix/www/mod_throttle312.tgz

vPsPersia.COM
July 2nd, 2010, 20:56
موقع نصب کلی اررور داد



mod_throttle.c: In function قcritical_createق:
mod_throttle.c:778: error: قap_user_idق undeclared (first use in this function)
mod_throttle.c:778: error: (Each undeclared identifier is reported only once
mod_throttle.c:778: error: for each function it appears in.)
mod_throttle.c:779: error: قap_group_idق undeclared (first use in this function)
mod_throttle.c:789: error: قap_null_cleanupق undeclared (first use in this function)
mod_throttle.c:801: warning: passing argument 4 of قap_log_errorق makes integer from pointer without a cast
mod_throttle.c:801: warning: passing argument 5 of قap_log_errorق from incompatible pointer type
mod_throttle.c:801: warning: passing argument 6 of قap_log_errorق makes pointer from integer without a cast
mod_throttle.c: At top level:
mod_throttle.c:994: error: expected ق)ق before ق*ق token
mod_throttle.c:1271: warning: قstruct poolق declared inside parameter list
mod_throttle.c: In function قcreate_dir_configق:
mod_throttle.c:1275: warning: assignment makes pointer from integer without a cast
mod_throttle.c: At top level:
mod_throttle.c:1296: warning: قstruct poolق declared inside parameter list
mod_throttle.c: In function قcleanup_moduleق:
mod_throttle.c:1331: warning: passing argument 1 of قcmd_preserveق from incompatible pointer type
mod_throttle.c: At top level:
mod_throttle.c:1335: warning: قstruct poolق declared inside parameter list
mod_throttle.c: In function قinit_moduleق:
mod_throttle.c:1340: error: قthrottle_moduleق undeclared (first use in this function)
mod_throttle.c:1400: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1482: warning: passing argument 1 of قcritical_createق from incompatible pointer type
mod_throttle.c:1484: warning: passing argument 1 of قap_add_version_componentق from incompatible pointer type
mod_throttle.c:1484: error: too few arguments to function قap_add_version_componentق
mod_throttle.c:1486: warning: passing argument 1 of قcmd_restoreق from incompatible pointer type
mod_throttle.c:1490: warning: passing argument 4 of قap_log_errorق makes integer from pointer without a cast
mod_throttle.c:1490: warning: passing argument 5 of قap_log_errorق from incompatible pointer type
mod_throttle.c:1498: error: قap_null_cleanupق undeclared (first use in this function)
mod_throttle.c: At top level:
mod_throttle.c:1502: error: expected declaration specifiers or ق...ق before قpoolق
mod_throttle.c: In function قchild_initق:
mod_throttle.c:1504: error: قpق undeclared (first use in this function)
mod_throttle.c:1504: error: too many arguments to function قcritical_child_initق
mod_throttle.c: At top level:
mod_throttle.c:1512: warning: قstruct poolق declared inside parameter list
mod_throttle.c:1513: error: conflicting types for قcmd_preserveق
mod_throttle.c:316: error: previous declaration of قcmd_preserveق was here
mod_throttle.c: In function قcmd_preserveق:
mod_throttle.c:1521: warning: passing argument 1 of قap_server_root_relativeق from incompatible pointer type
mod_throttle.c:1522: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1597: error: قap_user_idق undeclared (first use in this function)
mod_throttle.c:1597: error: قap_group_idق undeclared (first use in this function)
mod_throttle.c: At top level:
mod_throttle.c:1607: warning: قstruct poolق declared inside parameter list
mod_throttle.c:1608: error: conflicting types for قcmd_restoreق
mod_throttle.c:317: error: previous declaration of قcmd_restoreق was here
mod_throttle.c: In function قcmd_restoreق:
mod_throttle.c:1615: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1616: warning: passing argument 1 of قap_server_root_relativeق from incompatible pointer type
mod_throttle.c:1617: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1626: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1627: warning: assignment makes pointer from integer without a cast
mod_throttle.c: At top level:
mod_throttle.c:1740: error: expected ق)ق before ق*ق token
mod_throttle.c:1811: error: expected ق)ق before ق*ق token
mod_throttle.c: In function قthrottle_policyق:
mod_throttle.c:1864: warning: return makes pointer from integer without a cast
mod_throttle.c: In function قthrottle_single_userق:
mod_throttle.c:1884: warning: passing argument 1 of قcreate_dir_configق from incompatible pointer type
mod_throttle.c:1895: warning: return makes pointer from integer without a cast
mod_throttle.c: In function قthrottle_userق:
mod_throttle.c:1939: warning: passing argument 1 of قap_os_is_path_absoluteق from incompatible pointer type
mod_throttle.c:1939: error: too few arguments to function قap_os_is_path_absoluteق
mod_throttle.c:1942: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1949: warning: assignment makes pointer from integer without a cast
mod_throttle.c:1950: warning: assignment makes pointer from integer without a cast
mod_throttle.c: In function قthrottle_client_ipق:
mod_throttle.c:1995: warning: return makes pointer from integer without a cast
mod_throttle.c: In function قthrottle_remote_userق:
mod_throttle.c:2027: warning: return makes pointer from integer without a cast
mod_throttle.c: In function قthrottle_runtime_fileق:
mod_throttle.c:2039: warning: assignment makes pointer from integer without a cast
mod_throttle.c: In function قthrottle_lock_fileق:
mod_throttle.c:2052: warning: assignment makes pointer from integer without a cast
mod_throttle.c: In function قpolicy_over_limitق:
mod_throttle.c:2219: warning: passing argument 4 of قap_log_rerrorق makes integer from pointer without a cast
mod_throttle.c:2219: warning: passing argument 5 of قap_log_rerrorق from incompatible pointer type
mod_throttle.c: In function قpolicy_documentق:
mod_throttle.c:2354: error: too few arguments to function قap_sub_req_lookup_uriق
mod_throttle.c:2372: warning: passing argument 4 of قap_log_rerrorق makes integer from pointer without a cast
mod_throttle.c:2372: warning: passing argument 5 of قap_log_rerrorق from incompatible pointer type
mod_throttle.c: In function قpolicy_idleق:
mod_throttle.c:2490: warning: passing argument 4 of قap_log_rerrorق makes integer from pointer without a cast
mod_throttle.c:2490: warning: passing argument 5 of قap_log_rerrorق from incompatible pointer type
mod_throttle.c: In function قpolicy_speedق:
mod_throttle.c:2565: warning: passing argument 4 of قap_log_rerrorق makes integer from pointer without a cast
mod_throttle.c:2565: warning: passing argument 5 of قap_log_rerrorق from incompatible pointer type
mod_throttle.c: In function قis_request_for_fileق:
mod_throttle.c:2701: warning: initialization makes pointer from integer without a cast
mod_throttle.c:2702: warning: initialization makes pointer from integer without a cast
mod_throttle.c:2705: error: قapr_finfo_tق has no member named قst_modeق
mod_throttle.c:2705: error: قapr_finfo_tق has no member named قst_modeق
mod_throttle.c: In function قuri_handlerق:
mod_throttle.c:2739: error: too few arguments to function قap_sub_req_lookup_uriق
mod_throttle.c: In function قaccess_handlerق:
mod_throttle.c:2788: warning: comparison between pointer and integer
mod_throttle.c:2794: warning: comparison between pointer and integer
mod_throttle.c:2814: error: request for member قsin_addrق in something not a structure or union
mod_throttle.c:2823: warning: comparison between pointer and integer
mod_throttle.c:2824: error: قapr_finfo_tق has no member named قst_sizeق
mod_throttle.c: In function قauthentication_handlerق:
mod_throttle.c:2853: warning: comparison between pointer and integer
mod_throttle.c: In function قauthorization_handlerق:
mod_throttle.c:2869: warning: comparison between pointer and integer
mod_throttle.c:2875: warning: comparison between pointer and integer
mod_throttle.c:2891: error: قconn_recق has no member named قuserق
mod_throttle.c:2903: warning: comparison between pointer and integer
mod_throttle.c:2904: error: قapr_finfo_tق has no member named قst_sizeق
mod_throttle.c: In function قget_config_by_dirق:
mod_throttle.c:2956: error: قthrottle_moduleق undeclared (first use in this function)
mod_throttle.c: In function قmime_handlerق:
mod_throttle.c:2978: warning: comparison between pointer and integer
mod_throttle.c:2983: warning: assignment makes pointer from integer without a cast
mod_throttle.c:2986: warning: assignment makes pointer from integer without a cast
mod_throttle.c:3001: error: قapr_finfo_tق has no member named قst_uidق
mod_throttle.c:3016: warning: comparison between pointer and integer
mod_throttle.c:3017: error: قapr_finfo_tق has no member named قst_sizeق
mod_throttle.c: In function قfixup_handlerق:
mod_throttle.c:3042: warning: comparison between pointer and integer
mod_throttle.c:3051: warning: assignment makes pointer from integer without a cast
mod_throttle.c:3100: warning: passing argument 1 of قcmd_preserveق from incompatible pointer type
mod_throttle.c:3102: warning: passing argument 1 of قcmd_restoreق from incompatible pointer type
mod_throttle.c:3128: warning: assignment makes pointer from integer without a cast
mod_throttle.c: In function قlog_handlerق:
mod_throttle.c:3155: warning: comparison between pointer and integer
mod_throttle.c:3181: error: قapr_finfo_tق has no member named قst_uidق
mod_throttle.c:3188: error: request for member قsin_addrق in something not a structure or union
mod_throttle.c:3191: error: قconn_recق has no member named قuserق
mod_throttle.c:3202: warning: comparison between pointer and integer
mod_throttle.c:3213: warning: comparison between pointer and integer
mod_throttle.c: In function قstatus_html_headerق:
mod_throttle.c:3276: warning: assignment makes pointer from integer without a cast
mod_throttle.c:3293: error: قap_restart_timeق undeclared (first use in this function)
mod_throttle.c: In function قstatus_html_lineق:
mod_throttle.c:3372: warning: assignment makes pointer from integer without a cast
mod_throttle.c:3379: warning: passing argument 1 of قap_os_is_path_absoluteق from incompatible pointer type
mod_throttle.c:3379: error: too few arguments to function قap_os_is_path_absoluteق
mod_throttle.c:3382: warning: assignment makes pointer from integer without a cast
mod_throttle.c: In function قgeneral_html_headerق:
mod_throttle.c:3624: warning: assignment makes pointer from integer without a cast
mod_throttle.c: In function قgeneral_html_lineق:
mod_throttle.c:3743: warning: assignment makes pointer from integer without a cast
mod_throttle.c: At top level:
mod_throttle.c:3871: error: expected ق=ق, ق,ق, ق;ق, قasmق or ق__attribute__ق before قcontent_handlersق
mod_throttle.c:3886: warning: initialization from incompatible pointer type
mod_throttle.c:3889: warning: initialization from incompatible pointer type
mod_throttle.c:3892: warning: initialization from incompatible pointer type
mod_throttle.c:3895: warning: initialization from incompatible pointer type
mod_throttle.c:3898: warning: initialization from incompatible pointer type
mod_throttle.c:3901: warning: initialization from incompatible pointer type
mod_throttle.c:3904: warning: initialization from incompatible pointer type
mod_throttle.c:3908: warning: initialization from incompatible pointer type
mod_throttle.c:3911: warning: initialization from incompatible pointer type
mod_throttle.c:3914: warning: initialization from incompatible pointer type
mod_throttle.c:3920: error: expected ق=ق, ق,ق, ق;ق, قasmق or ق__attribute__ق before قthrottle_moduleق
apxs:Error: Command failed with rc=65536
.



البته قبش به مسیر APXS گیر داد و در واقع مسیر گفته شده در بالا موجود نبود ، من با locate مسیر /usr/sbin/apxs رو فقط پیدا کردم و بهش دادم ، و اررور های بالا رو داد