Archive for October, 2010


Cpanel failurls File

Cpanel failurls File

The failurls file, located at /var/cpanel/failurls, allows you to specify where resellers can redirect users who fail to authenticate with cPanel.

Enter the URLs to which resellers can redirect users, one per line, in the file.

Entries in this file must meet the following requirements:

Entries must be an exact match. Dynamic URLs are not acceptable.


Dynamic content on the login page must be passed via hidden POST variables. Using the GET query string will fail because it will not match any entry in the failurls file exactly. When you are finished creating entries in the failurls file, you must restart cPanel. To restart cPanel, run the following command as the root user:


Reference :


Limit SSH access By IP Address

Limit SSH access By IP Address

Secure your server more, and prevent brute force attacks, you can limit SSHd to certain IP addresses by manipulating the /etc/hosts.allow file and the /etc/hosts.deny file.

Open /etc/hosts.allow

Use the following command to open the hosts.allow file:

vi /etc/hosts.allow

Once this file is open, add the following line:

SSHD : ipaddress : ALLOW

Open /etc/hosts.deny

Use the following command to open the hosts.deny file:

vi /etc/hosts.deny

Once it opens, add the following line to the file:


Save and exit, and you have successfully limited SSH access by IP address.


Installing cPanel DNS ONLY

Installing cPanel DNS ONLY

To begin your installation, use the following commands:

Open the /home directory by typing the command cd /home

Fetch the latest installation file from the cPanel servers by typing the command

wget -N

Open and run the installation files by typing the command sh latest-dnsonly

Installing PostgreSQL on Your cPanel/WHM Server

cPanel requires PostgreSQL 7.3.x or later.

First step is to update cpanel using /scripts/upcp from command line while logged in as root. If you have PostgreSQL 7.2.x installed, back up your databases using pg_dumpall.

Move your existing PostgreSQL data directory somewhere else by, for example, typing the following command:

mv /var/lib/pgsql /var/lib/pgsql.old

Type the following command:


From WHM now select Postgres Config in the SQL Services section of WHM. Type a new PostgreSQL password in the text box and click Change Password.


How to fix Cpanel Account Permissions

How to fix Cpanel Account Permissions

Fixing file and directory permission.

find /home/*/public_html/* -type f -exec chmod 644 {} \;
find /home/*/public_html/* -type d -exec chmod 755 {} \;

we can specify user by replace * with usename

To fix the permission for all the websites.

for i in `ls /var/cpanel/users` ; do chown -R $i.$i /home/$i/public_html/* ; done

« Prev - Next »