human choroinic gonadotropin

Archive for September, 2015


 Powered by Max Banner Ads 

Disable Leech protect on cpanel server to reduce mysql load

Tuesday, September 29th, 2015

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


stop and start rebuild software raid

Tuesday, September 29th, 2015

mdadm /dev/md0 -f /dev/sda1                                  stop the rebuild
mdadm: set /dev/sda1 faulty in /dev/md0
mdadm /dev/md0 -r /dev/sda1                                  remove the devise to avoid start rebuild again after reboot
mdadm: hot removed /dev/sda1
mdadm /dev/md0 -a /dev/sda1                                     to start rebuild 
mdadm: hot added /dev/sda1

Hide home ip from header to avoid Spamhaus Policy Block List

Monday, September 14th, 2015

in WHM -> Exim Configuration -> Advanced Editor

Add the following in the first box:

================================================================

received_header_text = Received: ${if def:sender_rcvhost {from ${if def:authenticated_id {localhost}{$sender_rcvhost}}\n\t}{${if def:sender_ident {from ${quote_local_part:$sender_ident} }}}}by $primary_hostname ${if def:received_protocol {with $received_protcol}} ${if def:tls_cipher {($tls_cipher)\n\t}}(Exim $version_number)\n\t${if def:sender_address {(envelope-from <$sender_address>)\n\t}}id $message_exim_id${if def:received_for {\n\tfor $received_for}}

 

================================================================

 

If the message is from an authenticated user, it will display “localhost” instead of the senders home ip address, thus resolving the issue.

Thanks.

netstat command to check the connection to the ports

Monday, September 14th, 2015

netstat

ssh to the server and then run the below commnad

#netstat -noa |more

 

thanks.

Repair Mysql Table — linux command line

Wednesday, September 9th, 2015

/var/lib/mysql]# myisamchk -r table

 

for example

cd  /var/lib/mysql

#myisamchk -r ./cnselang_db/wpskini_cn_wfHits

 

 

Linux Default Permission

Monday, September 7th, 2015

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;

 

but run the above command will help to set the default permissions, first one for folders, and the second one for files.

 

by Ayad