Archive for the Category »cPanel + cPanel scripts «

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.

How to install cPanel theme?

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

root@gunjan[~]# cd /usr/local/cpanel/whostmgr/docroot/
root@gunjan[~]#mkdir -p cpanelappinstall
root@gunjan[~]#cd cpanelappinstall
root@gunjan[~]#wget -q http://www.cpanelskindepot.com/skindownload/cpanelappinstall.tar
root@gunjan[~]#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 :)

Category: cPanel + cPanel scripts  Tags: ,  Comments off

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@gunjan[~]#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@gunjan[~]#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

Simple cgi script to check the Server uptime?

The following script you can use to check the Server uptime?

root@Gunjan [/usr/local/apache/cgi-bin]# nano loads
#!/bin/bash

echo Content-type: text/plain
echo

echo $(hostname)
echo “=>”
echo $(uptime)

Options FollowSymLinks or SymLinksIfOwnerMatch forbidden error?

If you receive following error message after browsing the domain/website

[Sat Oct 31 04:28:39 2009] [error] [client x.x.x.x] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /home/xxx/public_html/xxx/403.shtml
[Sat Oct 31 04:29:47 2009] [error] [client x.x.x.x] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /home/xxx/public_html/xxx.co.uk/Bracelets/Stencil-Heart-Bracelet.html

To avoid above error you can add following codes in .htaccess file.

root@gunjan[#]vi .htaccess

RewriteEngine On
Options +FollowSymLinks
:wq!

What is path for “ifconfig”?

The ifconfig is present under /sbin  director and the PATH of the normal users don’t point to /sbin directory and if execute “ifconfig” under normal by using any normal cPanel user login details then it will not show you.

you can set PATH to add /sbin  #PATH=$PATH:/sbin

Or you can enter command with full path like # /sbin/ifconfig

How to enable stats from WHM?

To enable the stats you need root login details.Once you logged into your WHM as root user follow the steps.

Look in “Server Configuration”.
Choose “Statistics Software Configuration”.
Scroll down to “Statistics Processing Configuration Summary”.
Click on “Configure Statistic Process Time Schedule”.
Tick the boxes to denote the times during which stats should not be run.
Click “Save”, and exit.

As well as you also need to follows the steps in Tweak settings

Open whm and check “Server Configuration” listing.
Click on “Tweak Settings”.
Scroll down an check “stats Programs”; tick the boxes.

Awstats Stats
Webalizer Stats

Scroll down and check bottom site; click “Save”, and exit.

Invalid command ‘BytesLog’ error after upgrade to cPanel version to 11

cPanel version get upgraded to 11 most common problem many peoples are facing with starting Apache on new installation.
The error reported is :

Invalid command ‘BytesLog‘, perhaps mis-spelled or defined by a module not included in the server configuration
/usr/local/apache/bin/apachectl start: httpd could not be started

To fix this mod_log_bytes.c needs to be re-compiled.

cd /usr/local/cpanel/apache


/usr/local/apache/bin/apxs -iac mod_log_bytes.c

How to install new cPanel theme?

To install new cPanel theme you need to root login details.once you logged in to server follow the steps

cd /usr/local/cpanel/whostmgr/docroot/
mkdir -p cpanelappinstall
cd cpanelappinstall
wget -q http://www.cpanelskindepot.com/skindownload/cpanelappinstall.tar
tar -xf cpanelappinstall.tar
rm -f cpanelappinstall.tar

Then run http://gunjan.hotstname.com:2086/cpanelappinstall/install.php
and follow the steps

Note : Replace gunjan.hotstname.com with your servers hostname

Category: cPanel + cPanel scripts  Tags:  Comments off

How to check on cPanel server SuExec configured values.

To check the suexec configured value use following command suexec -V on server by using root login details.

root@server [~]# suexec -V

It will give you following result.

-D AP_DOC_ROOT=”/var/www”
-D AP_GID_MIN=100
-D AP_HTTPD_USER=”apache”
-D AP_LOG_EXEC=”/var/log/httpd/suexec.log”
-D AP_SAFE_PATH=”/usr/local/bin:/usr/bin:/bin”
-D AP_UID_MIN=500
-D AP_USERDIR_SUFFIX=”public_html”

To collect more information about above value refer following URL

Check it

Category: cPanel + cPanel scripts  Comments off