MyTrueHost launched Web Hosting for Indian clients just in Rs 60/Month with various payment options(netbanking, debit card, credit card,cash card or paypal).
Please Visit at https://www.mytruehost.in

How to disable local-mail delivery for one domain name?

You can disable local-mail delivery for one  domain name from your shell and follow the instructions..

First go to file
root@admin[~]#vi /etc/localdomains
Then select the domain name give them comment# or remove it and save the file
:wq!

Second step go to file
root@admin[~]#vi /etc/remotedomains
and add the domain name we have comment or removed in the above file
:wq!

Basically when ever we use external mail server at that time we need to remove domains entry from /etc/localdomains file and add it in /etc/remotedomains file

 

How to install cPanel theme?

To install cPanl theme root login is required.Login into shell as root user and follow the steps

root@admin[~]# cd /usr/local/cpanel/whostmgr/docroot/
root@admin[~]#mkdir -p cpanelappinstall
root@admin[~]#cd cpanelappinstall
root@gunjan[~]#wget -q http://www.cpanelskindepot.com/skindownload/cpanelappinstall.tar
root@admin[~]#tar -xf cpanelappinstall.tar
root@gunjan[~]#rm -f cpanelappinstall.tar

Than browse following URL  http://91.100.00.01:2086/cpanelappinstall/install.php

You can replace your server ip in above URL instead of 91.100.00.01 and follow the instruction

You done it :)

 

How to set E-mail size in exim?

You can set the E-mail size limit from your WHM.

First login into WHM
Second select “Exim Configuration Editor”  present unde ” Service Configuration” section.
Third scroll down and  click on  “Advanced Editor” optoin.

You will see  the empty box (remember select first empty box) where you can type  (right underneath where you see #!!# cPanel Exim 4 Config), enter in the following:

message_size_limit = 100M

Fourth scroll down to the bottom of that screen and click “Save” option.

Exim configuration will be rebuilt with the new option and your Exim will be restarted.

 

Database sizes shows zero in cPanel?

Once we upgrade from cPanel 11.24 to 11.25 version. We are receiving lots bug. One of them is database size showing zero in cPanel. To resolve this issue you have to edit following file /var/cpanel/cpanel.config

root@support[~]vi /var/cpanel/cpanel.config

Search line “disk_usage_include_sqldbs” in file “ /var/cpanel/cpanel.config and change it

From

 

disk_usage_include_sqldbs=0

to

disk_usage_include_sqldbs=1

And run script

-/scripts/update_db_cache

 

Ownership wrong for cPanel users.

Sometime when we migrate the servers by using rsync we face ownership problems for cPanel users files/directories. At that time we can use following command from shell to resolve issue within few minutes.

——

for i  in `cat /etc/trueuserdomains   | awk ‘{print $2}’`
do
chown $i.$i /home/$i -R;
chown $i.mail /home/$i/etc -R;
chown $i.nobody /home/$i/public_html;
done;

—–

 

 

Make sure that you are using root login details to run above command.

Internal Server Error “cPanel user” is over quota.

Some time we receive following error message while browsing webmail etc.

Internal Server Error

User ‘test ‘ is over quota

———————————

cpsrvd/11.25  server at xx.xx.xx.xx.

 

Solution :

To resolve above error refer following steps.
root@server[~]#cd /var/cpanel/overquota/

root@server [/var/cpanel/overquota]#ll | grep your_cpanel_user_name

Once you found out file for your cPanel user name either remove the file or rename it like cpanel_user_name-back etc.

And now browse your webmail but make sure that you have increased disk space for your domain if its really exceeded.

 

 

 

New subdomain missing cgi-bin directory.

While creating new subdomain from cPanel we are missing cgi-bin directory. At that time refer following steps.

Login in to WHM and check the domains hosting account package allow “CGI Privilege” or not. If not then enable “CGI Privilege” by editing packages.

WHM >> Account Functions >> Modify An Account and select the user from list and check box following option.

CGI Privilege

And save the package. Now you will able to creaet subdomain with the cgi-bin directory.

Note : As well as plesae set “Y” in WHM >> Main >> Server Configuration >> Basic cPanel/WHM Setup  >>CGI Script Alias section.

 

Rename package names on cPanel server.

Many time we like to rename package name for our hosting accounts but as hosting account is assigned to large number of user and we can’t reassign package one by one to all users as its time consuming process at that time we can refer following steps to secure time.

First login in to shell as root user.

root@server [~]# cd /var/cpanel/packages/

Now rename package for test purpose, we are renaming test_test package to test_support package.

root@server [/var/cpanel/packages]# mv test_test test_support

Now make sure that you reassign package to your users who are currently using test_test package.

root@server [/var/cpanel/packages]# cd /var/cpanel/users

Now search users who are currently using test_test package.

root@server [/var/cpanel/users]# grep test_test * -R
admin12:PLAN=test_test
test12:PLAN=test_test

Now simply run following command to replace all instance for test_test package in users file with new package name test_support

root@server[/var/cpanel/users]#grep test_test * -R -l > rename-packages

The above command will store all users name who currently using test_test package in rename-packages file.

root@server [/var/cpanel/users]# cat rename-packages
admin12
test12

Now create new file packages.sh with the following code.

root@server [/var/cpanel/users]# pico packages.sh

#!/bin/sh
dir=”/var/cpanel/users/”
fstr=”test_test”
rstr=”test_support”
exec 3<&0
exec 0<”/var/cpanel/users/rename-packages”
while read LINE ; do
sed -i “s/$fstr/$rstr/” “$LINE”
done

Set executable permission to file packages.sh file.

root@server [/var/cpanel/users]#chmod 755 packages.sh

Before running packages.sh file check one of the users file and check package name.

root@server [/var/cpanel/users]# cat admin12
# cPanel — If you edit this file directly you must run /scripts/updateuserdomains afterwards to rebuild the system caches
BWLIMIT=unlimited
CONTACTEMAIL=
CONTACTEMAIL2=
DEMO=0
DNS=server.com
FEATURELIST=default
HASCGI=1
IP=xx.xx.xx.xx
LANG=english
LOCALE=en
MAXADDON=5
MAXFTP=0
MAXLST=0
MAXPARK=0
MAXPOP=0
MAXSQL=0
MAXSUB=0
MTIME=1283914039
MXCHECK-server.com=0
OWNER=root
PLAN=test_test
RS=x3
STARTDATE=1269778722
USER=admin12

Now run file packages.sh

root@server [/var/cpanel/users]#./packages.sh

After running packages.sh file you can check user file name and found out that package name is changed.

root@server [/var/cpanel/users]# cat admin12
# cPanel — If you edit this file directly you must run /scripts/updateuserdomains afterwards to rebuild the system caches
BWLIMIT=unlimited
CONTACTEMAIL=
CONTACTEMAIL2=
DEMO=0
DNS=server.com
FEATURELIST=default
HASCGI=1
IP=xx.xx.xx.xx
LANG=english
LOCALE=en
MAXADDON=5
MAXFTP=0
MAXLST=0
MAXPARK=0
MAXPOP=0
MAXSQL=0
MAXSUB=0
MTIME=1283914039
MXCHECK-server.com=0
OWNER=root
PLAN=test_support
RS=x3
STARTDATE=1269778722
USER=admin12

Note : The above steps useful to rename packages for users , it will not change any value like addon , parked domain limit etc.

 

Nameserver IPs not showing in WHM?

In recent cPanel version “Nameserver IPs” section won’t show ips. All ips are present in /etc/nameserverips file but still ips missing.

root@root[~]# cat /etc/nameserverips
198.168.0.1=ns1.test.com
198.168.0.2=ns2.test.com

In that case correct ips entry in the following /var/cpanel/nameserverips.yaml file.

root@root [~]# cat /var/cpanel/nameserverips.yaml

ns1.test.com:
“198.168.0.1?: 1
count: 1
zones: test.com
ns2,.test.com:
198.168.0.2: 1
count: 1
zones: test.com

Now check nameserver ips in WHM >> Main >> DNS Functions >> Nameserver IPs.

 

How to install the imagick on cPanel server

Login in to the server as root user and run the commands one by one and if you have any problem then let us know..

server@root[~]# cd /usr/local/src

server@root[/usr/local/src]#wget http://pecl.php.net/get/imagick-2.2.0.tgz

server@root[/usr/local/src]#tar -zxvf imagick-2.2.0.tgz

server@root[/usr/local/src]#cd imagick-2.2.0

server@root[/usr/local/src/imagick-2.2.0]#phpize

server@root[/usr/local/src/imagick-2.2.0]#./configure

server@root[/usr/local/src/imagick-2.2.0]#make

server@root[/usr/local/src/imagick-2.2.0]#make install