MyTrueHost launched Web Hosting for Indian clients just in Rs 60/Month with various payment options(netbanking, debit card, credit card,cash card or paypal).
Please Visit at https://www.mytruehost.in

How to Disable Telnet

Telnet sends clear text passwords and usernames through logins and should be disabled on all web servers and replaced with SSH.

TELNET server listens for incoming messages on port 23, and sends outgoing messages to port 23.

1. Login to your server through SSH and su to root.

2. Type pico /etc/xinetd.d/telnet

3. Look for the line: disable = no and replace with disable = yes

4. Now restart the inetd service: /etc/rc.d/init.d/xinetd restart

5. Turn off it through chkconfig as well because it can still start through that.
/sbin/chkconfig telnet off

6. Scan your server to ensure port 23 is closed.
nmap -sT -O localhost
Also run ps -aux | grep telnet and if you find anything other than “grep telnet” you may kill the process.

 

Fantastico is not installed at the default location

Error :
Fantastico is not installed at the default location /usr/local/cpanel/3rdparty/fantastico. Either move the Fantastico directory from it’s current location to /usr/local/cpanel/3rdparty/fantastico OR enable ioncube loaders in WHM -> Tweak settings.

Solutions that work:

Solutions ::

  • Make sure ioncube is installed on the server &  make sure it is enabled in WHM -> Tweak settings.
  • You may want to try and update fantastico with:  cd /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/scripts/ ; /usr/local/cpanel/3rdparty/bin/php cron.php
  • You may also want to rebuild cpanel’s php with /scripts/makecpphp
  • Lastly try a cpanel update with /scripts/upcp –force

.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

If you are getting “(13)Permission denied: /home/username/public_html/shop/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://www.yourdomain.com/shop/index.html” error in  apache error logs file /usr/local/apache/logs/error_log as well as the site is showing 403 Forbidden Error.

Then first please check the permissions of your folder and .htaccess file because folder permission are most likely 755 and .htaccess permission 644. Permissions can be changed via FTP or SSH.

In case you still are getting the same problem, then it might be the Frontpage Extensions causing the problem. To fix:

* Login into your CPanel account
* Click on Frontpage Extensions icon
* Click on Reinstall extensions button beside your problem domain.
* Done.

(make sure to have a backup copy of your data before reinstalling Frontpage)

 

Enable Logging of Slow Queries in MySQL Database

Any non-optimal SQL  commands or statements that take too long or lengthy time to execute will use up a lot of system resources, causing MySQL database to run slower.

MySQL has built-in functionality to capture slow query log or identify queries that take a long time to execute. You can enable the full SQL queries logs to a file or only slow running queries log.

To enable you just need to add some lines to your my.cnf file, and restart. Add the following:

* To enable slow Query Log only

log-slow-queries = /var/log/mysql/mysql-slow.log
long_query_time = 1

After enabling slow query, mysqld writes a statement to the slow query log file and it consists of all SQL statements that took more than long_query_time seconds to execute. The time to acquire the initial table locks is not counted as execution time. mysqld only log after SQL statements has been executed and after all locks have been released, so log order might be different from execution order. The minimum and default values of long_query_time are 1 and 10, respectively.

  * To enable full Log Query

log=/var/log/mysqldquery.log

The above will log all queries to the log file.

Restart MySql after making the changes.

Starting Apache HTTPD Failed Cannot Open or No such file mod_bwlimited, mod_log_bytes or mod_bandwidth

On restaring Apache, you may get the following error:

Nov 21 09:31:40 web httpd: Cannot load usr/local/apache/libexec/mod_log_bytes.so into server: /usr/local/apache/libexec/mod_log_bytes.so: cannot open shared object file: No such file or directory
Nov 21 09:31:40 web rc: Starting httpd: failed

Invalid command ‘BytesLog’, perhaps mis-spelled or defined by a module not included in the server configuration

This is most likely due to the cause that the mod_belimited.so, mod_log_bytes.so, or mod_bandwidth.so are deleted or corrupted. These 3 files are unique on cPanel based servers.

This error is received when the Apache HTTPD server has been messed up with some shared library files such as mod_auth_passthrough.so, mod_bwlimited.so and mod_log_bytes.so located in libexec directory, that have accidentally been deleted or corrupted.

The solution to the error is to recompile those shared library modules. You can easily compile these cPanel modules for Apache by using the following commands:

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

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

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

After compilation, the .so files will automatically be copied to libexec directory for Apache HTTPD web server.

 

How To Install Cpanel And WHM

To begin your installation, use the following commands:

  1. cd /home — Opens the directory /home.
  2. wget -N http://layer1.cpanel.net/latest — Fetches the latest installation file from the cPanel servers.
  3. sh latest — Opens and runs the installation files.
  4. /usr/local/cpanel/cpkeyclt — Activates your license after installation.

How to install RVSiteBuilder ?

RV SiteBuilder is a complete online application to build a Website without the need to have any coding knowledge. It is fully integrated to CPanel and is therefore easily accessible.

RVsitebuilder requires a license that needs to be purchased fromwww.rvsitebuilder.com

SSH as root in your server and download the installer using the following command:

cd /usr/local/cpanel/whostmgr/docroot/cgi/
rm -f rvsitebuilderinstaller.tar
wget http://download.rvglobalsoft.com/rvsitebuilderinstaller.tar
tar -xvf rvsitebuilderinstaller.tar
chmod 755 addon_rvsitebuilder.cgi

Now login to WHM as root and at the bottom of the left menu you will find RVSiteBuilder Installer under the Plugins Section.
Click on the RVSiteBuilder Installer and proceed with the installation. After the installation is complete it will automatically direct you to RVSiteBuilder Manager Page, here you can configure RVSiteBuilder.

Once completed you should see RVSiteBuilder as a feature in your cPanel.

 

Howto Install mod_evasive

mod_evasive and mod_security modules are used to secure Apache Web Server from DDoS and brute force attacks by implementing web application firewall.

Download the source
wget http://www.zdziarski.com/projects/mod_evasive/mod_evasive_1.10.1.tar.gz
tar -xzvf mod_evasive_1.10.1.tar.gz
cd mod_evasive

Compile in the mod_evasive apache module using apxs
For Apache 2
/usr/local/apache/bin/apxs -i -a -c mod_evasive20.c

For Apache 1.3
/usr/local/apache/bin/apxs -i -a -c mod_evasive.c

If the apxs path is not /usr/local/apache/bin/apxs replace it with the appropriate path

Edit your httpd.conf /usr/local/apache/conf/httpd.conf

Add the below lines:
======================
DOSHashTableSize 3097
DOSPageCount 2
DOSSiteCount 50
DOSPageInterval 1
DOSSiteInterval 1
DOSBlockingPeriod 10
DOSEmailNotify user@yourdomain.com
======================
Restart apcahe:

/etc/init.d/httpd restart

 

 

How to check cPanel version from command line ?

To see the cPanel version running on your Server, login as root and run the below command:

# /usr/local/cpanel/cpanel -V

 

 

IMPORTANT: Do not ignore this email. Hostname error

IMPORTANT: Do not ignore this email.
The hostname (hostname.server.com) resolves to . It should resolve to xx.xx.xx.xx. Please be sure to correct /etc/hosts as well as the ‘A’ entry in zone file for the domain.

Some are all of these problems can be caused by /etc/resolv.conf being setup incorrectly. Please check this file if you believe everything else is correct.

A newly setup cPanel system may have such an error message when you login to WHM.

You can resolve this by going to the DNS Functions area on the left menu and selecting Add an A Entry for your Hostname.

WHM should automatically try to add the relevant A record for your hostname to the DNS zone present on your system. You can now logout and then log in back to WHM to see if the message returns.