How to enable alternate port for exim?


Cheap reseller Hosting


Exim is a mail transfer agent (MTA) used on Linux/Unix-like operating systems. It is freely available under the GNU GPL and it aims to be a general and flexible mailer with extensive facilities for checking incoming e-mail.

Normally default port for exim is 25. but most of the ISP block port 25. so it is necessary that an altername port for exim is open on server. Following are the steps to configure alternate port on cpanel/WHM installed on the server.

1) Login to WHM as root.

2) In WHM click on  Main >> Service Configuration >> Service Manager

3) Now tick the check box under Exim on another port and also enter the alternate port no: in the corresponding text box.


Cheap web Hosting


syslogd status failed in WHM


Cheap reseller Hosting


Sometimes, you may face an issue related to syslogd showing down in service WHM >>  Main >> Server Status >> Service Status
The issue can be resolved by
Checking related RPM on server
# rpm -q sysklogd
If its not installed, you can install it by
# yum install sysklogd
after installation, you will have to restart the service by
# /etc/init.d/syslog restart
Check the service in Service Manager in WHM, reenable it and check the status in Service Status.
Its done!

Cheap web Hosting


WordPress : error_logs file does not generate the error logs


Cheap reseller Hosting


WordPress issue :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If plugin or theme is not compatible then sometimes site shows blank page and error_logs file does not generate the error logs, then need to enable the WP_DEBUG in wp-config.php file. After enabling this function, it will show an error on the site and it will find out which is the problem plugin or theme.
Syntax :
=================================
define(‘WP_DEBUG’, true); — to enable
define(‘WP_DEBUG’, false); — to disable
=================================
If ‘WP_DEBUG line does not exist inside wp-config.php the add it after define(‘DB_COLLATE’, ”); line. After disabling the problem plugin/theme you need to make define(‘WP_DEBUG’, true); to define(‘WP_DEBUG’, false); .
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cheap web Hosting


Install LiteSpeed on Cpanel server .!!!


Cheap reseller Hosting


Following post discuss how to install Install LiteSpeed  on Cpanel server.

Login to SSH on the server running cPanel.
# cd /usr/locel/src
# wget http://www.litespeedtech.com/packages/cpanel/lsws_whm_plugin_install.sh
# chmod 700 lsws_whm_plugin_install.sh
# ./lsws_whm_plugin_install.sh
# rm -f lsws_whm_plugin_install.sh
Register for 15days trial license:
http://www.litespeedtech.com/trial/license
* Login to WHM and click the ‘LiteSpeed Web Server’ button.
* Click ‘Install LiteSpeed’ and let it run through the installation procedure.
* Enter your license information & assign an administrator password (Don’t tick the box to start LiteSpeed immediately)
* Click ‘Build matching PHP Binary’
* Click ‘Switch to LiteSpeed’
* Click ‘Admin Web Console’ and login
Final stages of setup
* Configuration > General > Index Files > Edit
Set the following and save.
Index Files: index.html, index.php, index.php5, index.htm
Auto Index: Yes
Auto Index URI => /_autoindex/default.php
* In SSH Type:
# ln -sf /usr/local/lib/php/autoindex /usr/local/lsws/share/autoindex
* Configuration > Log > Server Log > Edit
Set the following:
Log Level: Info
Debug Level: None
* Now click ‘Actions > Graceful Restart’ to make these changes permanent.
Please note that port 7080   should be enabled in the firewall


Cheap web Hosting


Enable PHP4 for single domain !!


Cheap reseller Hosting


If your server is running with default php version 5 and you want php 4 for single account so you just can add the following line in .htaccess.
Create one .htaccess file under public_html and add the following code.

AddHandler application/x-httpd-php4 .php

now you can create phpinfo page and check it will show your default php version is php4.

Cheap web Hosting


Install ImageMagick on the Cpanel server.


Cheap reseller Hosting


ImageMagick is one of the most requested add-ons that allows for image manupulation.    First, you should check GD on the server , it can be complied through easyapache.
First check Imagemagick on the server
/scripts/checkimagemagick
=======================================
Installation ImageMagick  on the server
/scripts/installimagemagick
Installation will take a couple minutes as it will install other packages needed by ImageMagick.
==========================================================
Check version of Imagemagick
/usr/bin/convert –version
It will show somthing below output.
Version: ImageMagick 6.7.1-7 2011-09-13 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP
==========================================================
Install ImageMagick through WHM.
Go to WHM -> Software -> Module Installers -> PHP Pecl (manage). On the box below “Install a PHP Pecl” enter “imagick” and click “Install Now” button – that’s all.  Restart Apache.
=========================================================
Uninstall ImageMagick
ImageMagick: /scripts/cleanimagemagick
WHM : Imagick: WHM -> Software -> Module Installers -> PHP Pecl (manage). Click on Uninstall button for Imagick
==========================================================
It can check where is located ImageMagick
# whereis convert
It will show you the directory
===================================================

Cheap web Hosting


How to view webalizer stats without login to cpanel .


Cheap reseller Hosting


Just follow below steps.
==============================================
cd /home/username/www
ln -s ../tmp/webalizer   webalizer
chown username.username  webalizer
cd ../tmp
chmod 755 ./
chmod 755 ./webalizer
==============================================
It will allow domain.com/webalizer/ for viewing stats without logging in to cpanel

Cheap web Hosting


How to update webalizer.


Cheap reseller Hosting


Some times , weblizer doesn’t update automatically. You  have to update manually update it. Follow the below steps to update manually update webalizer.

=============================================================
/usr/local/cpanel/3rdparty/bin/english/webalizer  -N  10  -D
/home/username/tmp/webalizer/dns_cache.db -R 250 -p -n domain.com -o
/home/username/tmp/webalizer
/usr/local/apache/domlogs/domain.com
===============================================================

Replace username and domain name of your hosting account.


Cheap web Hosting


Apache Optimization


Cheap reseller Hosting


httpd.conf is configuration file of apache server and all important options are stored there. httpd.conf is located at /usr/local/apache/conf/httpd.conf.

vi /usr/local/apache/conf/httpd.conf

MaxClients (Total number of concurrent connections.)

It should be set reasonable value because if set high value then there is chance a complete server hang in case of a DOS attack. It can set value as per hardware configuration . If you have 2 GB or RAM set this value to 300.
This should be set to a reasonable value. I suggest using this formula to determine the right value for your server.
MaxClients = 150 x RAM (GB)
If you set low value then it can create timeout problems for your clients if the limit is reached so better set reasonable value.
ServerLimit
This value should be same as MaxClients
ServerLimit = 150 x RAM (GB)
MinSpareServers and MaxSpareServers
MaxSpareServers and MinSpareServers control how many spare (unused) child-processes Apache will keep alive while waiting for more requests to put them to use. Each child-process consumes resources, so having MaxSpareServers set too high can cause resource problems. On the other hand, if the number of unused servers drops below MinSpareServers, Apache will fork (an expensive operation) new child-processes until MinSpareServers is satisfied.
should be set below value
MinSpareServers 5
MaxSpareServers 10
If you have more them 2 GB of RAM and you run a resource intensive website consider increasing MaxSpareServers.
MaxRequestsPerChild
It should not be set lower value because  it will put an unnecessary load on the apache server to recreate the child. It controls the number of request the a child serves before the child is killed
I suggest you set below value .

MaxRequestsPerChild 1000 for 1 GB RAM
10,000 for 2 GB and 0 for more than 2 GB RAM

KeepAlive and MaxKeepAliveRequests

KeepAlive provides long-lived HTTP sessions which allow multiple requests to be sent over the same TCP connection. In some cases this has been shown to result in an almost 50% speedup in latency times for HTML documents with many images, but having keepalive on is also a resource intensive setting.
Here comes the big question: To KeepAlive or not to KeepAlive?
Well the opinions are mixed here, some say to KeepAlive some say not to.

KeepAlive off
If you want to hear my option I would say NOT to KeepAlive if you are running a shared hosting business or if you want to get the most out of your hardware. You should KeepAlive only if the loading time of your pages is the most important factor in your business and you have the money to invest in a more powerful hardware. If you decide to KeepAlive I suggest you set MaxKeepAliveRequest low to something like 2 seconds.

StartServers
Sets the number of child server processes created on startup. This setting depends greatly on the type of webserver you run. If you run low traffic websites on that server set it low to something like 5. If you have resource intensive websites on that server you should set it close to MaxClients.

StartServers 5
Timeout
The amount of time Apache will wait for three things: the total amount of time it takes to receive a GET request, The amount of time between receipt of TCP packets on a POST or PUT request, the amount of time between ACKs on transmissions of TCP packets in responses.
The default value is 300. You should set time to something a bit lower. A setting of 150 is probably ok. This will also help in case of small DOS attacks like to ones targeting some phpBB forums. Do NOT set it any lower then 10 as your users will start having timeout problems.
Timeout 150
After you have done all the necessary changes you can go ahead and restart Apache.
There is an extra step that you have to do so that the changes that you done to httpd.conf aren’t lost when a recompile is done.
To also save the changes in the database you will have to run:
/usr/local/cpanel/bin/apache_conf_distiller –update
You can check to see if the changes were accepted and will not be discarded at the next apache recompile by running
/usr/local/cpanel/bin/build_apache_conf

Sample values:
MinSpareServers 5
MaxSpareServers 10
ServerLimit 600
MaxClients 600
MaxRequestsPerChild 0
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 3

Cheap web Hosting


Directory Index Forbidden Error !!


Cheap reseller Hosting


If you get below in error in error_log
========================================
[Thu  Sept 13  02:09:32 2012] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /home/domainusername/public_html/
[Thu  Sept 13  02:09:32 20129] [error] [client 127.0.0.1] Directory index forbidden by Options directive: /home/domainusername/public_html/
==================================================
Then you need to add below code in .htaccess file.
==================================
DirectoryIndex index.html
or
DirectoryIndex index.php
==================================
and then check your site.


Cheap web Hosting


1 3 4 5 6