Change HTTPD port number


We all know that the default Port number of Apache is 80. For more security purpose we can change Apache port number, Please see below mentioned steps inorder to change the port number.



Assume you need  to change the port number of httpd from  80 to 8080 and for https from 443 to 1023

Search the httpd configuration file


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

Add multiple Webmail Interfaces in Plesk


Sometimes you may arise a situation that client need to access multiple webmails Applications (such as Horde, SqurrileMail, Roundcube ...)  at a time in Plesk, through different links such as webmail.domainname.com for Horde and domainname.com/webmail for SqurrileMail. In such situation you can follow the below mentioned steps.
Please go through the example inorder to solve these type of issues.

At first login to Plesk and go to the Clients control panel
Click on Mail tab as specified in the screen shot.
 
Now you will be directed to the following page. Click on Change Settings option in the Mail tab.


Multiple PHP versions in the cPanel server


The PHP version on the servers will be the most tested out or proven one. But some clients may want a newer version and make use of the various upcoming features. Due to the various compatibility issues,  we can't perform a server wide PHP version change. In such cases, we need to install the newer version with the existing one and enable the client to switch to the newer one by changing the Handler.
Scenario
The client is hosted on a server with php 5.3.24 and he want to enable  5.4.14 for his domain.  There are  various blogs about running different major version of PHP on the server ie php 5 and php 4. But enabling different minor versions of same major version is a tricky one.
Recompile and install the default PHP (Optional)

If the existing installation is fine and has the necessary modules , then you can skip this step. Otherwise you need to recompile it using
/scripts/easyapache
Once it is done. You can proceed with the new PHP 5.4.14

Wordpress Sample index page

If you face any hack attempts like, may be your your wordpress index page is hacked by the hcaker. You can use below mentioned  index page.

===========================================================


<?php
/**
 * Front to the WordPress application. This file doesn't do anything, but loads
 * wp-blog-header.php which does and tells WordPress to load the theme.
 *
 * @package WordPress
 */
/**
 * Tells WordPress to load the WordPress theme and output it.
 *
 * @var bool
 */
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');

===============================================================

Mysql Commands


Configuration file

/etc/my.cnf     /root/.my.cnf


>mysqladmin varialbles

>mysql

>mysql -h <hostname/IP> -u user -p<password> dbname

logs
datadir     cPannel-/var/lib/mysql       server_name.err


file formats - storage engine format


Create Database

>mysqladmin create dbname;
>mysql> use dbname;
>SELECT User FROM mysql.user;
>mysql> show databases;
>mysql> show tables;
>mysql>CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
>select user();

Command to change the permissions

Use below mentioned command to change the permissions

For files


find . -type f -exec chmod 644 {} \;


For Directories

find . -type d -exec chmod 755 {} \;

:)

Command to find Symbolic links


Some times we may face hack attempts in the servers. The hackers place may symbolic links in a particular account in order to login to other account also as root user.

In order to find the symbolic links in the server use below mentioned command

#find . -type l -not -xtype l