Category Archives: cPanel

cPanel being one of the most popular and widely used control panel in hosting
We share few tips which we come across while working day in and day out.

softacalous Blank Screen cPanel/WHM

While trying to access softacalous from WHM > Plugins >

I was just getting White Screen

The tried disabling and enabling ioncube loader from WHM > Tweak Settings,

However the issue persisted

So I went ahead and reinstalled using below steps

the Softaculous folder here:

 

root@server1 [/usr/local/cpanel]# rm -rf /usr/local/cpanel/whostmgr/docroot/cgi/softaculous

root@server1 [/usr/local/cpanel]# wget -N http://files.softaculous.com/install.sh
–2017-07-25 12:03:36– http://files.softaculous.com/install.sh
Resolving files.softaculous.com… 192.198.80.3
Connecting to files.softaculous.com|192.198.80.3|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 4920 (4.8K) [application/x-sh]
Saving to: `install.sh’

100%[==================================================================================================================================================================>] 4,920 –.-K/s in 0s

2017-07-25 12:03:36 (279 MB/s) – `install.sh’ saved [4920/4920]

root@server1 [/usr/local/cpanel]# chmod 755 install.sh

 

———————————————-
Welcome to Softaculous Apps Installer
———————————————–

ln: creating symbolic link `/usr/local/cpanel/base/frontend/paper_lantern/softaculous/enduser’: File exists
ln: creating symbolic link `/usr/local/cpanel/base/frontend/x3/softaculous/enduser’: File exists
///////////////////////////////
// INSTALLING SOFTACULOUS :
// 1) CONFIGURING universal.php
// 2) FETCHED A LICENSE
// 3) UPDATING Categories
// 4) UPDATING Scripts List
// 5) UPDATING Installed Scripts List
// 6) SETTING A CRON JOB
// 7) DOWNLOADING SCRIPTS
///////////////////////////////

Syntax OK

Now softaculous is working fine

 

Cloudflare with Engintron

We had a issue where domain which is using cloudflare and server had engintron those domains were not working correctly

Engintron does support Cloudflare . There are few custom rules which needs to be setup from

WHM > Plugin > Emgintron  > Edit your custom_rules for Nginx

For domains which have dedicated IP below is the rule which needs to be added

if ($host ~ “oxyxxxxx.com”) {
set $PROXY_DOMAIN_OR_IP “173.1xx.xx5.xxx”;

}

Where you need to set right domain name and  right IP associated with domain

 

If using a shared IP address below is the rule that needs to be added in

Edit yourcustom_rules for Nginx and add below statement

set $PROXY_DOMAIN_OR_IP “XXX.XXX.XXX.XXX”;

Where you need to set shared IP in above example

 

 

 

 

error connection dropped by imap server. query capability

Was getting the error for squirrel mail on cpanel server

On Investigating could see issue was in Dovecot

Below is the fix I used

It’s possible that this can be rectified by increasing “Maximum Size of a Mail Process (MB)” under
Main >> Service Configuration >> Mailserver Configuration in WHM.

Once I did it the squirrel mail start working like a charm 🙂

 

 

 

IDN Addon Domain Issue

We had been working on adding an IDN addon domain in cPanel and received invalid domain name.

Internationalized domain name – Wikipedia
An internationalized domain name (IDN) is an Internet domain name that contains at least one label that is displayed in software applications, in whole or in part, in a language-specific script or alphabet

Domain cannot be added directly in cPanel because domain contains at least one label

Domain Name : lamé.com

We need to use below converter to convert the IDN to ASCII

http://idna-converter.com/?decoded=lam%C3%A9.com&encoded=&doencode=Encode+%3E%3E

Unicode url/domain: lamé.com

ASCII/Punycode (ACE) : xn--lam-dma.com

Once domain is converted in ASC can be added in cPanel.

 

***** FATAL: Failed to download updatenow.static from server: The system cannot update the /var/cpanel/sysinfo.config file. at /usr/local/cpanel/Cpanel/GenSysInfo.pm line 115.

While trying to upgrade cpanel  to new version was getting error

FATAL: Failed to download updatenow.static from server:

The issue was due to corrupt RPM

I used the below fix to resolve this issue


mkdir /root/old_rpm_dbs/

Now move the original RPMs to the new folder

mv /var/lib/rpm/__db* /root/old_rpm_dbs/

Finally rebuild the RPM database

rpm --rebuilddb

Now you can force an update of the cPanel server and it should work again.

/scripts/upcp -force

Parse html as PHP is easyapache 4

 

Normal rule in .htaccess to parse html files as php on easyapache 3 are not working on easyapache 4

#AddType application/x-httpd-php .php .htm .html

#<FilesMatch “\.(htm|html|php)$”>
#SetHandler application/x-httpd-php56
#</FilesMatch>

 

Below is the code which will need to be added In cpanel, multiphp manager will add the following for force a specific
version of php:

# php — BEGIN cPanel-generated handler, do not edit
# Set the “ea-php54” package as the default “PHP” programming language.

AddType application/x-httpd-ea-php54 .php .php5 .phtml

# php — END cPanel-generated handler, do not edit

Make sure the AddType and the selected php version matches! So there we go, simple when you know how.

 

 

DNS error bad owner name (check-names) /tmp/cpanel

While working with one client I was getting below error in DNS

DNS error bad owner name (check-names) /tmp/cpanel

So I went ahead and checked DNS zone file using below command

 

root@vps [/var/named]# named-checkzone onlinecsource.com /var/named/onlinesource.com.db
/var/named/onlinesource.com.db:56: _autodiscover._tcp.cheapsalesleads.onlinesource.com: bad owner name (check-names)
/var/named/onlinesource.com.db:57: _autodiscover._tcp.cheapsalesleads.onlinesource.com: bad owner name (check-names)
zone onlinesource.com/IN: loaded serial 2017030209
OK

So the error pointed to line 56 and 57 in zone file

Went ahead and deleted the line 56 and 57 and reload DNS zone file

All works good now

 

 

 

Incorrect DiskSpace and Information in cPanel

While working on one clients vps for incorrect disk usage  stats for mails

While the default cpanel has no emails the usage stats showed 750MB.

After going through I found a issue which was causing this

The file causing this issue was maildirsize

maildirsize is the file which shows stats information for each account

root@vps [/home/designse]# find . -iname maildirsize
./mail/designserver.net/gordon/maildirsize
./mail/designserver/gordy/maildirsize
./mail/designserver/auctions/maildirsize
./mail/designserver/homemedia/maildirsize
./mail/maildirsize

I went ahead and deleted the file to fix this issue.
root@vps [/home/designse]# cd mail/
root@vps [/home/designse/mail]# rm -rf maildirsize
root@vps [/home/designse/mail]#

Now all stats shows right details