buy tb500

Disable Leech protect on cpanel server to reduce mysql load

Doing the following seems gets rid of it until the next time cpanel is upgraded or until the next time apache is compiled.

Edit /var/cpanel/templates/apache2/main.default

Delete…

————

[% IF file_test('f', '/usr/local/cpanel/bin/leechprotect') -%]
RewriteEngine on
RewriteMap LeechProtect prg:/usr/local/cpanel/bin/leechprotect
RewriteLock /usr/local/apache/logs/rewrite_lock
[% END -%]
--------

Edit /usr/local/apache/conf/httpd.conf 

Delete ...
-----------
RewriteEngine on
RewriteMap LeechProtect prg:/usr/local/cpanel/bin/leechprotect
RewriteLock /usr/local/apache/logs/rewrite_lock
-----------

Kill the leachprotect process.


Run /usr/local/cpanel/bin/apache_conf_distiller --update

service httpd restart


Leave a Reply