web analytics

Category Cpanel

APE over SSL using stunnel in cpanel server

Refer To APE installation in cpanel server here

1) In order for APE to work with stunnel, make sure that the stunnel version in the server should be less than 4.3. Centos and RHEL 5 will most probably have stunnel installed already. If not, install stunnel.

2) Now we need to create a conf for ape.
vi /etc/stunnel/ape.conf and add the following to it.

cert = /etc/stunnel/stunnel.pem
debug = 7
output = /etc/stunnel/stunnel.log
;disable delay DNS lookup for ‘connect’ option
delay = no
;no time to wait for close_notify!
TIMEOUTclose = 0
accept =
connect =

Create a file for stunnel log.

# touch /etc/stunnel/stunnel.log

3) Now generate a CSR and key for *.ape.divya.com

# cd /etc/stunnel
# openssl req -nodes -newkey rsa:2048 -out csr.pem -keyout stunnel.pem

The ...

Read More

APE on port 80 – Installation and Setup in cpanel server

Version Installed – 1.1.1 and 1.1.2-dev are installed. Can switch as needed.
Config file – /usr/local/src/APE/bin/ape.conf

1) cd /usr/local/src

2) wget http://www.ape-project.org/stable/APE_Server-1.1.1.amd64.bin.tar.gz

3) tar -xzvf APE_Server-1.1.1.amd64.bin.tar.gz

4) cd APE_Server/bin

5) ./aped (notice it is a dot followed by a slash)

6) This will start APE. You may issue a Ctl+C and edit the file ape.conf in the same location as follows.

port = 80
daemon = yes
ip_listen = (put your IP address here)
domain = abc.com (put your domain name here)

7) Now we need to assign a dedicated IP address for ape.abc.com from WHM -> Edit DNS -> abc.com

8) DNS Functions -> Edit DNS zone -> abc.com and add the following entry

ape     14400     IN      A

Read More

Install Mod_evasive to prevent DOS attacks

Version Installed :- 1.10.1


  1. cd /usr/local/src

  2. tar –xzvf mod_evasive_1.10.1.tar.gz

  3. cd mod_evasive/

  4. Take a backup of the apache conf, as it needs to be modified


cp –pv /usr/local/apache/conf/httpd.conf httpd.conf.beforeevasive_bak.$(date +%F)


  1. /usr/local/apache/bin/apxs –cia mod_evasive20.c

  2. Add the following to httpd.conf now from WHM-> Apache Configuration -> Include Editor -> Post Virtual Host Include


<IfModule mod_evasive20.c>
DOSHashTableSize 3097
DOSPageCount 5
DOSSiteCount 100
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 600


  1. Restart apache – /etc/rc.d/init.d/httpd restart

Read More

Install Pagespeed in cpanel server

Version Installed :




Pagespeed requires deflate module, so that should be compiled already with 


Once deflate is enabled, do the following.


  1. cd /usr/local/src

  2. Check if the server is 32 bit or 64 bit and then download the corresponding pagespeed rpm. You can check it by issuing any of the following commands.


uname –m




getconf LONG_BIT


  1. mkdir mod-pagespeed

  2. cd mod-pagespeed

  3. rpm2cpio ../mod-pagespeed-beta_current_x86_64.rpm | cpio –idmv

  4. cp etc/httpd/conf.d/pagespeed.conf /usr/local/apache/conf/

  5. cp usr/lib64/httpd/modules/mod_pagespeed.so /usr/local/apache/modules/

  6. chmod 755 /usr/local/apache/module...

Read More

APC in cpanel server

Version Installed – APC-3.1.9

  1. cd /usr/local/src

  2. wget http://pecl.php.net/get/APC-3.1.9.tgz

  3. tar -zxvf APC-3.1.9.tgz

  4. cd APC-3.1.9

  5. phpize

  6. ./configure –enable-apc –enable-apc-mmap –with-apxs –with-php-config=/usr/local/bin/php-config

  7. make

  8. make test

  9. make install

  10. Now, enable the apc module in php.ini

vi /usr/local/lib/php.ini

Add the following lines to it.


  1. Now restart apache for the changes to get into effect

/etc/rc.d/init.d/httpd restart

Read More

X-Ham-Report in Cpanel

Cpanel now adds a spam/ham report to the email headers. If the message is not spam, it adds a ham report as follows.

X-Ham-Report: Spam detection software, running on the system “server.def.com”, has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn’t spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.

Content preview: testing […]

Content analysis details: (-1.9 points, 5.0 required)

pts rule name description
—- ———————- ————————————————–
-0.0 SPF_PASS SPF: sender matches SPF record
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]

Read More

FTP login not working, but cpanel does

At times, you may get issues like, the cpanel login details may be working, but the same won’t work for FTP. As you are aware, cpanel and main FTP login details are always same. Resetting the password may not help in this case. Then check if a file named /etc/ftpusers is present in the server and if your username is included there. This files blocks FTP access for the users listed in it. Remove your user from there, if present and you can regain FTP access

Read More

All cpanel accounts showing one database by default

Sometimes, when you login to a cpanel account, you will see that the mysql database section lists one database even if no databases are created. To correct it, got to

“Postgres Config” => and “Install Config” in WHM

If postgresql is installed but not configured via WHM, all users can show up as having one postgresql database.

Read More

Warning : Your editing session has expired. This is usually caused by a long period of inactivity. Please re-load the page.

Sometimes, when you click on a hyperlink or insert image icon in cpanel file manager, you get the following error.


Warning: session_start() [function.session-start]: open(/tmp/sess_ff452ccb8539e80490338f0ab3712f44, O_RDWR) failed: Permission denied (13) in /usr/local/cpanel/base/3rdparty/wysiwygPro/conf/customSessHandlers.inc.php on line 26
Your editing session has expired.
This is usually caused by a long period of inactivity. Please re-load the page.


Here are the possibles solutions to it.

1) Confirm that session.save_path is set as /tmp in /usr/local/lib/php.ini

2) /tmp has correct permission and is writable

3) session.gc_maxlifetime is set as 14400

4) session.bug_compat_42 is turned off

5) If none of the above works, try the following.

touch /...

Read More

Switch Account Option Disappears

Sometimes, when you login to an account’s cpanel as reseller, there should be a drop down box to switch to the cpanel of various accounts under that reseller. If it is not present, you can check the following things.

In WHM -> Tweak Settings -> make sure the following option is not checked.

Disable login with root or reseller password into the users’ cPanel interface. Also disable switch account dropdown in themes with switch account feature.

Sometimes, the problem can be with only one or two domains. All accounts’ cpanel may be listing the drop down, but when you enter into one the drop down just vanishes.

In that case, it could be a problem with the account password. Try resetting the password of that account and see if that solves the problem.

Read More