ABHIONLINUX
Site useful for linux administration and web hosting

Showing posts with label cpanel. Show all posts
Showing posts with label cpanel. Show all posts

2012/02/19

Softaculous installation in cpanel server

Softaculous is an auto installer that contains lots of scripts. You can check the steps given below on how to install softaculous on a cpanel server.

Before installation you need to make sure that ioncube loader  is installed and are enabled. You should select "cpanel php loader" as ioncube in whm --> tweak settings.

Now loginto server as root
cd /usr/local/cpanel/whostmgr/docroot/cgi 
wget -N http://www.softaculous.com/ins/addon_softaculous.php
chmod 755 addon_softaculous.php

Now you can manage softaculous from whm
WHM > Plugins (Add-Ons on older versions than 11) > Softaculous - Instant Installs





2011/05/05

Wrong mysql disk usage in cpanel.



You have zero databases in your cpanel account. After login to your cpanel, you can see the mysql database consuming more disk space.  This can be corrected by the following steps.

 Login to server and edit cpanel.config.

[root@server /]# vi /var/cpanel/users/cpanel.config

Replace 'disk_usage_include_sqldbs=0' with  'disk_usage_include_sqldbs=1'

Save this file and run the command given below.

[root@server /]# /scripts/update_db_cache

In the whm-tweak setting, you need to enable the option
'Use INFORMATION_SCHEMA to acquire MySQL disk usage (MySQL 5+ required) '


2011/04/04

Spool file is locked (another process is handling this message) : Unable to send emails ,exim




There are many resons for this error. They may be due to dns, firewall.

Please try the fix given below.

#cd /var/spool/exim4/db
# mv * /backup
move all the files to a backup folder

#/etc/init.d/exim restart

This should fix the issue. If this doesnt fix the issue, please try by restarting the firewall. Firewall may be blocking your emails.

How to enable IP rotation in exim.


If your server are having multiple IP and you want to send each emails in different IP address. You can follow the steps given below. This is used to maintain the ip reputation. While doing this, please make sure that this is not used for spamming.

Open you exim config,

vi  /etc/exim.conf

search for the line : interface =

replace this line with
interface = 192.168.0.1${eval:${substr{-2}{1}{$tod_zulu}}%7+1}

If your server is having ip's from 192.168.0.11 to 192.168.0.20 , you can use above line.
+1 is  is the starting ip ie  192.168.0.1'1'
%9 is the incriment value ie 11(192.168.0.11) to how much. here it is 20 (192.168.0.20)



2011/03/20

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit ifnecessary. Use ‘LogLevel debug’ to get a backtrace

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit ifnecessary. Use ‘LogLevel debug’ to get a backtrace


When you try to browse your website, if you are getting this error. This means that you have exceeded the limit of intername redictions used in your website.


To avoid  this error message simply use following code in .htaccess file.


RewriteRule .* - [L]

2010/12/23

PGsql database not showing in cpanel

Go to /var/lib/pgsql/data/pg_hba.conf
Change ‘md5′ to ‘trust’.
It should look like :
local all all trust
host all all 127.0.0.1 255.255.255.255 trust

2009/12/23

Installing fantastico on a cPanel Server

Here are the steps:-
============

Login to server WHM >> Plugins >> Fantastico De Luxe WHM Admin >> Click here >> Select a version from the drop down menu >> Follow the remaining installation steps, using the default information.

If the Fantastico install option is not available,then we have to download Fantastico manually onto our server.

=========================================
1) Login to the server via ssh

2) Change the folder using the command:

[root@localhost ~]#cd /usr/local/cpanel/whostmgr/docroot/cgi

3) Download the Fantastico install file using the command

[root@localhost ~]#wget http://www.netenberg.com/files/free/fantastico_whm_admin.tgz

4) Extract the install file using the command:

[root@localhost ~]#tar -xzpf fantastico_whm_admin.tgz

5) Remove the install file using the command:

[root@localhost ~]#rm -rf fantastico_whm_admin.tgz

6) Log out of the SSH connection.

7) log back into cPanel.

8)Go through Plugins >> Fantastico De Luxe WHM Admin

9) Continue the install using the above mentioned steps.
========================================

Fantastico Showing Blank Page

Fantastico is showing blank page after installation.New installation was also giving the blank page.

FIX:-
====
Change the following on config.php file.

#define(”PLUGIN_ROOTDIR”,”/tmp”);
define(”PLUGIN_ROOTDIR”,”plugins”);

Cause:-
The server is PHP-SUEXEC enabled so the plugin_rootdir should be given
as “plugins” in config.php file.

Error "This application is currently not available” in fantastico

The user is getting the following error while accessing fantastico :
This application is currently not available

Fix:-
====
You have to make register_global = On in /usr/local/cpanel/3rdparty/etc/php.ini

“cannot connect to mysql ” in fantastico

If you are getting an error like “cannot connect to mysql ” in fantastico
then check if the soft link is there in /tmp. If there is no softlink.Issue the following command:-

[root@bigboy ~]#ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

2009/10/01

Cpanel Hardening

You should configure the following in your WHM (CPanel):

Main >> Server Configuration >> Tweak Settings

[x] Prevent the user ‘nobody’ from sending out mail to remote addresses (php and cgi scripts generally run as nobody if you are not using phpsuexec and suexec respectively.)

[x] Track the origin of messages sent though the mail server by adding the X-Source headers (exim 4.34+ required)

Main >> Security >> Fix Insecure Permissions (Scripts)

Main >> Security >> Tweak Security

“Compilers are disabled for unpriviledge users”

Main >> Service Configuration >> Enable/Disable SuExec

suexec Status “enabled”

Main >> Account Functions >> Disable or Enable Demo Mode

Select from “Users” the “demo” account and click “Modify” then click “Disable” if it exists :)

Access Awstats from outside of cpanel

Step 1.
Download awstats from http://awstats.sourceforge.net

Step 2.
Uncompress awstats-5.6.tgz

Step 3.
Copy the contents of the uncompressed cgi-bin folder from your hard drive to the user cgi-bin directory (this includes awstats.pl, awstats.model.conf, and the lang, lib and plugins sub-directories).

Step 4.
If necessary (should not be needed with most setups), edit the first (top-most) line of awstats.pl file that is #!/usr/bin/perl to reflect the path were your Perl interpreter is installed. Default value works for most of Unix OS, but it also might be #!/usr/local/bin/perl

Step 5.
Move AWStats icon sub-directories and its content into a directory readable by your web server, for example /home/users/public_html/icons

Step 6.
Copy awstats.model.conf file into a new file named awstats.myvirtualhostname.conf. This new file must be stored in /home/user/public_html/cgi-bin.

Step 7.

Edit this new config file with your own setup :
- Change LogFile value with full path of your web server log file
(The path is:
LogFile="/usr/local/apache/domlogs/domain.com").

- Check if LogFormat has the value "1" (it means "NCSA apache combined/ELF/XLF log format").

- Change DirIcons parameter to reflect relative path of icon directory.
(DirIcons="/icons")

- Edit SiteDomain parameter with the main domain name or the intranet web server name used to reach the web site to analyze (Example: www.mydomain.com).

IMPORTANT! - Change DirData to use the same Statics file than Cpanel Awstats and do not loose any entry.
(DirData="/home/user/tmp/awstats/")

Step 8.

Access AwStats by the URL:
www.domain.com/cgi-bin/awstats.pl?config=domain.com