Monday 14 March 2016

Tmpwatch installation to clean cache files

yum -y install tmpwatch
crontab -e
0 */1 * * * /usr/sbin/tmpwatch -am 1 /tmp/nginx_client



Blocking xmlrpc attack via .htaccess

You can add the below code to your .htaccess file to block POST requests to xmlrpc.php file due to excessive brute force attacks :

ErrorDocument 403 default
<Files xmlrpc.php>
    <Limit POST>
        Order deny,allow
        Deny from all
    </Limit>
</files>

Shutdown command

 /sbin/shutdown -h now

Email address verifying

You can verify the email accounts if they are valid from the following links :

http://hellodns.net/index.php/home/emailVerifier
http://verify-email.org/

Find command

find . -name '.Trash' -exec du -sch {} \; | grep M | sort -n

R1 soft plugin installation in cpanel servers

Here are the steps to install R1 soft plugin in paper_latern theme on cpanel.

http://wiki.r1soft.com/display/ServerBackup/Set+up+cPanel+plugin

This link mainly focus on installing the plugin on X3 theme. For custom installation on paper_latern theme. We have to run this script :

/usr/local/cpanel/scripts/install_plugin  (path to plugin folder/r1soft-cpanel-plugin-2.0) --theme paper_lantern

path to plugin folder >> The place where we have downloaded the plugin archive and extracted it

For custom installation in x3 theme :

/usr/local/cpanel/scripts/install_plugin  (path to plugin folder/r1soft-cpanel-plugin-2.0) --theme x3

In my case I have downloaded and extracted the plugin to /backup/r1soft/ location so the command will be :

 /usr/local/cpanel/scripts/install_plugin /backup/r1soft/r1soft-cpanel-plugin-2.0 -theme paper_lantern
 /usr/local/cpanel/scripts/install_plugin /backup/r1soft/r1soft-cpanel-plugin-2.0 --theme x3


If you are getting a 404 error while accessing the plugin after the installation please copy the r1redirect.php file to the following location :

cp r1redirect.php /usr/local/cpanel/base/frontend/paper_lantern/