FormMail script

Follow the links below:

http://scriptarchive.com/readme/formmail.html

http://scriptarchive.com/download.cgi?s=formmail

You need to upload the formmail script to cgi-bin/ folder and set permissions for formmail.pl to 755. Then change one line in the .pl script:

from: @referers = ('scriptarchive.com','YOUR_IP'); to: @referers = ('yourdomain.com','www.yourdomain.com');

You will need to add the following lines to your contact form:

<input type=hidden name="recipient" value="[email protected]">
Read the rest

How to show a real multisite WordPress super admin users via MySQL command line

For multisite WordPress version run the following commands:

mysql
use database_name;
SELECT * FROM wp_sitemeta where meta_key='site_admins';

This will also allow you to know which users can access plugins for management… Read the rest

How to enable Inline HTML display in Horde

cPanel’s Horde has “Inline HTML” is disabled by default

The error you probably got:

##
This message part contains HTML data, but inline HTML display is disabled.
View HTML data in new window.
Convert HTML data to plain text and view in new window.
Read the rest

How to install Flask

How to install Flask

wget http://pypi.python.org/packages/source/F/Flask/Flask-0.10.tar.gz
tar -xzf Flask-*.tar.gz
cd Flask-*

Installing..

python2.6 setup.py install --user

Update your .htaccess with the following lines:

vi .htaccess

AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.fcgi/$1 [QSA,L]

Update your index.fcgi with the following lines:

vi index.fcgiRead the rest

How to configure firewall on CentOS cPanel server to use IPSET

This will improve your firewall's  performance

Install IPSET using:

yum install ipset ipset-devel -y

Update configuration file /etc/csf/csf.conf. Value for LF_IPSET needs to be set to 1 to get it enabled

Once its done go ahead and increase DENY_IP_LIMIT and DENY_TEMP_IP_LIMIT values for example up to 3000

You may use the following sed command for that

sed -i -e 's/LF_IPSET = "0"/LF_IPSET = "1"/g' /etc/csf/csf.conf
Read the rest

How to install CSF firewall on CentOS cPanel server

Download and install using:

wget https://download.configserver.com/csf.tgz
tar xfz csf.tgz
cd csf
sh install.sh

Update the following file with a trusted IP addresses

/etc/csf/csf.allow

Go ahead and disable testing mode

sed -i -e 's/TESTING = "1"/TESTING = "0"/g' /etc/csf/csf.conf

Once done, restart your firewall

csf -r

To add your IP address to a permanent allow list use:

csf -a 11.22.33.44

To block an IP address:

csf -d 11.22.33.44

Use following to see the lfd logs

tail -f /var/log/lfd.log
Read the rest

CloudLinux, lveinfo issue

Problem when lveinfo reflects an empty or error results

root@server[~]# lveinfo -u username 

Error while reading lve_version from database

root@server [~]# lveinfo -u username 

+—-+–+—-+—-+—-+—+—+—+—+

|From|To|aCPU|mCPU|lCPU|aEP|mEP|lEP|EPf|

+—-+–+—-+—-+—-+—+—+—+—+

To fix this out:

/etc/init.d/lvestats stop 

mv /var/lve/lveinfo.db /var/lve/lveinfo.db_old 

/etc/init.d/lvestats start 

Stats should start showing in ~1 minute

root@server [~]# lveinfo -u username 

+———–+———–+—-+—-+—-+—+—+—-+—+—+—+—–+—–+—–+—–+—–+——+—+—–+—–+—–+—–+—–+
| From | To |aCPU|mCPU|lCPU|aIO|mIO|lIO |aEP|mEP|lEP|aVMem|mVMem|lVMem|aPMem|mPMem|lPMem |EPf|VMemF|PMemF|aIOPS|mIOPS|lIOPS|
+———–+———–+—-+—-+—-+—+—+—-+—+—+—+—–+—–+—–+—–+—–+——+—+—–+—–+—–+—–+—–+
|07-28 12:35|07-28 12:36| 0 | 1 | 9 | 0 | 3 |3072| 0 | 0 | 20| 0 | 0 | 1.0G| 6.3M| 6.5M|256.0M| 0 | 0 | 0 | 0 | 0 | 1024|
+———–+———–+—-+—-+—-+—+—+—-+—+—+—+—–+—–+—–+—–+—–+——+—+—–+—–+—–+—–+—–+

Done!… Read the rest