How to Reboot Dedicated Server login to WHM

The recommended option is Graceful Reboot. This way the reboot will be queued, and when all services are stopped the server will be restarted. Occasionally, rebooting server can be useful for installations or configuration changes. However, it is not recommended that to performed server reboot frequently as this can cause more harm than good.

But in some crucial situations, reboot  can be perform for dedicated or VPS server with the following easy steps in WHM.

Login to , to perform Graceful Server Reboot.

Server reboot

Search for Server Reboot option

Reboot Server through WHM

Choose the option “Graceful Server Reboot

Reboot Server through WHM

Click on “Proceed” to initiate the reboot process.

Now, you have initiated the rebooting process for your VPS  / dedicated server and it will start working normally after reboot is completed. If you are still facing any issue, you can contact support team for more help.

How to Create a Subdomain

Create a Subdomain

To create a Subdomain, you need to Login to cPanel, click on Subdomain under Domains section. 

Enter the desired prefix in the Subdomain text box.

Select the desired main domain from the menu.

Create Subdomain

Enter the home directory for the subdomain in the Document Root text box.

Click Create.

Note: home directory for the subdomain contains the files that pertain to the subdomain.

How to Create an Add-on Domain in cPanel

What is Addon domain.

The Addon domains allow you to control multiple domains from your single account. An addon domain links as a new domain name to a sub directory of your account’s public_html (document root) directory, and then stores its files in that sub directory. This means that you can host additional domains in your account.

You can give an addon domain email addresses, forwarders, and more the same way as a primary (main) domain on the account.

Create an addon domain.

To create an addon domain, perform the following steps:

Login to cPanel, under DOMAINS section, click on Addon Domains

Enter the new addon domain’s name in the New Domain Name text box.

Create Addon Domain

Enter the directory that you wish to contain the addon domain’s files in the document root text box.

Note:- When you enter the domain name, cPanel automatically populates the Subdomain or FTP Username text box. To create multiple addon domains with the same username and different extensions (such as and, manually enter a unique username in the Subdomain or FTP Username text box.

Create Addon Domain

Click on Password Generator, select I have copied this password in a safe place, Click on Use Password. 

And Click on Add Domain.

Now that your addon domain name has been added to your cPanel you can go to that folder and upload your web site files. Once the propagation takes place your web site files and emails for your addon domain name will be live on the internet.

How to Modify Hosts File on server

Minor changes to your hosts file allows us to override the DNS for a domain, on that your local machine and is useful while you want to test your site without the temporary / test link, prior to going live site with SSL; verify that an alias site works, prior to DNS changes; and for other DNS-related reasons.

Changed to hosts file causes your local machine only to look directly at the IP address specified.  You will have to add two entries to hosts file that contain the IP address that you want the site to resolve to and the address.

The hosts file is a plain text file, and is usually named hosts. A hosts file will have one or more lines referencing your local computer (localhost) and will resemble this:- localhost

Adding the following two lines,  for example, point and  (change the IP )


The article provide instructions for locating and editing the hosts file on the operating systems listed below:-

  • Windows 10, Windows 8.1, Windows 7, and Windows Vista
  • Windows NT, Windows 2000, and Windows XP
  • Linux

After you enter information and save the file, your system begins resolving to the specified IP address. After testing is finished, remove these entries.

Windows 10 and 8.1

Open the command prompt as administrator.

Search ‘cmd’ on Windows 10 or 8.1 and right click on the Command Prompt and select ‘Run as administrator’.

Edit hosts

On the opened command prompt, type ‘cd drivers‘ ENTER then ‘cd etc‘ ENTER as shown below. This is to go to the location where the host file is located.

Edit Hosts

Make sure you are in the correct folder path, it should be C:\Windows\System32\Drivers\etc. Type ‘notepad hosts’ to open the hosts file in notepad.

Edit Hosts

We assume that you know the content of the file. Type the IP address of the domain/host name you want to give, then name. You can see the examples in same file.

Edit Hosts

Once you have modified the file with appropriate settings, click Save from File menu. That’s it, we have successfully modified the hosts file in Windows 10/8.1 now.

Method II

If you are not good in using command prompt, then this method will be handy in editing the hosts file in GU interface.

Open the location of hosts file, it’s under C:\Windows\System32\Drivers\etc. Once you have located the file right click on it and open with notepad.

Edit Hosts

Make the necessary changes to the file.

Edit Hosts

And click Save on the File menu.

Windows 7 and Windows Vista

Click Start  Start button , click All Programs, click Accessories, right-click Notepad, and then click Run as administrator.

 User Account Control permission If you are prompted for an administrator password or for a confirmation, type the password, or click Allow or Yes.

Open the Hosts file,  make the necessary changes, and then click Save on the Edit menu. If using Windows 7, you will need to click Save on the File menu.

Windows NT, Windows 2000, and Windows XP

Open the file located at C:\Windows\System32\Drivers\etc\hosts

Click Start, click All Programs, click Accessories, right-click Notepad,

Make the necessary changes to the file.

And click Save on the File menu.


Open the Terminal Window.
Open the hosts file in a text editor (you can use any text editor)

vi /etc/hosts

Enter domain user password.
Make the necessary changes to the file.
Save the file.

How to Change Hostname For cPanel & WHM version 56

In computer networking, your hostname is used as a label by which to identify your physical server.

To change the server’s hostname, you should  use one of the following methods:

Enter your hostname in the Setup Networking section of WHM’s Initial Setup Wizard interface.

Login to WHM Change Host name interface

(Home >> Networking Setup >> Change Hostname).

Call WHM API 1’s sethostname function.

Run the /usr/local/cpanel/bin/set_hostname utility as the root user.

Hostname Should meet the below requirements:

A fully qualified domain name

Registered with a registrar.

 Follows the instructions in the Instructions section.

Perform the below details to change your Host name

  1. Enter your hostname into the New Hostname text box.
  2. Click Change. A popup window will appear that prompts you to add an A entry.
  3. Click Add An A Entry for your hostname.
  4. Review the information about your server and, if it is correct, click Add Entry.

System will automatically configure the hostname and Also add the correct A entry for hostname.


  • Don’t use socially-unacceptable hostname, as hostname will appear in mail headers.
  • Only use lowercase, Latin-script letters in hostnames.

AutoConfig and Autodiscover

AutoConfig and Autodiscover

About AutoConfig and Autodiscover

By default, cPanel automatically creates AutoConfig and Autodiscover DNS records for your domain.

AutoConfig (AutoConfigure) and Autodiscover services quickly and easily configure a user’s mail client to receive their cPanel email.

AutoConfig and Autodiscover are web services that are used by a growing number of applications and which help in configuring your mobile devices and desktop clients.

Autodiscover is used by Outlook and all mobile devices including iPhone, iPod, iPad and Android devices while Autoconfig is used by Thunderbird. All communication is configured to be secured through SSL by default.

How to enable AutoConfig and Autodiscover, perform the following steps:

Login to WHM,  navigate to Home >> Server Configuration >> Tweak Settings >> Domains.

Find the Proxy sub-domains setting and select On.

Find the Thunderbird and Outlook AutoConfig and Autodiscover support (enables proxy sub-domain and SRV record creation) setting and select On.

Save it.

Use AutoConfig and Autodiscover

Enter your email address and password into your mail client, and the appropriate service will handle the rest.

Data validation process for .UK Domains

Nominet will attempt to validate all name and address data through a number of third party data sources at the point of registration, or when the data is changed. Further information is available on how Nominet performs the initial data validation and the process is set out in our data quality process maps.

Validated data

Validation means that all of the following conditions can be satisfied:

  • Data passes the initial data completeness check; and
  • The registrant’s name is present on a third party database, or other verification can be supplied, including by the registrar, registrant or other reliable third party source; and
  • The registrant’s address is present on a third party database or other verification can be supplied, including by the registrar, registrant or other reliable third party source
Data that cannot be validated

Data that cannot be validated through our third party sources will be further analysed by Nominet. Data that is most likely to be inaccurate or incomplete will be manually reviewed. If it is confirmed as being inaccurate, incomplete and/or in breach of our Terms & Conditions of Domain Name Registration a data quality work flow will be started as described below.

For data classified as less likely to be inaccurate no further action will be taken by us at this stage, although we will undertake spot-checks on data in this category.  The data will be flagged on the WHOIS as ‘Nominet was not able to match the registrant’s name and/or address against a 3rd party data source on DD-Month-YYYY’.

If Accredited Channel Partners choose to validate data that they have received notifications for, or data less likely to be inaccurate, and confirm this to us, the WHOIS entry will show as ‘The Registrar is responsible for having checked these contact details’. Please see EPP for instructions on how to positively validate your data.

Channel Partner or Self-Managed tags

Non-validated data submitted by Self-Managed or Channel Partner tags and manually classified as most likely to be inaccurate, will result in an e-mail being sent to the registrant. We will ask them to either:

  1. Correct or update the data provided; or
  2. Send appropriate documentation to allow validation of the data provided

We will then process the data in the following ways.

  1. Where the data is updated or corrected this will be re-submitted for validation. If it is still not possible to validate the data the registrant will be asked for documentation to evidence their name and/or address.
  2. Where documentation is provided, a member of our Customer Services team will use this to validate the data.
  3. Please note that if the data cannot be validated, domain names will be suspended.

We will not delete domain names suspended for poor quality. They can either be renewed through the normal process or will be deleted in the usual way approximately 90 days after expiry.

Any communications with registrants will also be sent to their registrar.

Accredited Channel Partner tags

Non-validated data submitted through Accredited Channel Partner tags and manually classified as most likely to be inaccurate, will trigger a notification to be sent to the registrar.

One of the following actions will then be required from the registrar:

  1. Working with the registrant the data could be corrected or updated. Where a registrar supplies updated or corrected data to Nominet this will be re-submitted for validation.
  2. The data could be validated through the registrar’s auditable validation process. You may choose to confirm to us that you have been successful in your validation. This will result in the WHOIS entryshowing as ‘validated’ immediately, rather than ‘awaiting validation’ for 30 days. Please see EPPfor instructions on how to positively validate your data. Where validation is not possible a data quality lock should be placed on the domain name
  3. Accredited Channel Partners have the optional facility to delete domain names suspended for poor data quality. Please see EPP instructions for details on how to do this. You can also perform this function through the Web Domain Manager.  Please note that domain names with a data quality lock can be renewed in the usual way, deleted by the registrar or deleted by us in the usual way approximately 90 days after expiry.

Where data is updated by Nominet and is then subsequently validated, a notification can be received by the registrar.  You can select to receive this notification by logging into your Online Services account and setting your notification preferences accordingly.

Source :

How to Enable MySQL Slow Query Log

Enable MySQL Slow Query Log
Enable MySQL Slow Query Log

Getting MySQL queries right is very important for the performance of Web application. similarly, getting indexes on the right columns in the right tables make difference between queries that take fractions of a second and queries that can take upwards of 10 seconds.

SSH server and create the MySQL log directory and slow log file:

mkdir /var/log/mysql
touch /var/log/mysql/server1-slow.log
chown mysql.mysql -R /var/log/mysql

Log in to the MySQL CLI via


Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 633645
Server version: 5.5.49-cll MySQL Community Server (GPL)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.


Set the log-file location for the Slow Query log.

mysql> SET GLOBAL slow_query_log_file = ‘/var/log/mysql/server1-slow.log’;

Determine what makes a query “slow”, by setting the limit (in seconds) after which a query is logged to the slow query log. I’ve setup logs every query that exceeds 10 seconds in duration.

mysql> SET GLOBAL long_query_time = 10;

Now enable the Slow Query log.

mysql> SET GLOBAL slow_query_log = ‘ON’;
mysql> FLUSH LOGS;

You can also make all queries that do not use indexes be logged to the same Slow Query log.

mysql> SET GLOBAL log_queries_not_using_indexes = ‘YES’;

If you want to make these changes persistent, modify the my.cnf and add these lines to the [mysqld] part of the config.


slow_query_log = /var/log/mysql/server1-slow.log
long_query_time = 10
log_queries_not_using_indexes = YES

Note: This will also work for MariaDB or Percona’s version of MySQL.

To check its setup correctly, request the running parameters from MySQL.

mysql> SHOW GLOBAL VARIABLES LIKE ‘log_queries_not_using_indexes’;

mysql> SHOW GLOBAL VARIABLES LIKE ‘log_queries_not_using_indexes’;
| Variable_name | Value |
| log_queries_not_using_indexes | ON |
1 row in set (0.00 sec)


mysql> show global variables like ‘%slow%’;
| Variable_name | Value |
| log_slow_queries | ON |
| slow_launch_time | 2 |
| slow_query_log | ON |
| slow_query_log_file | /var/log/mysql/server1-slow.log |
4 rows in set (0.00 sec)

mysql> SHOW GLOBAL VARIABLES LIKE ‘long_query_time’;

mysql> SHOW GLOBAL VARIABLES LIKE ‘long_query_time’;
| Variable_name | Value |
| long_query_time | 10.000000 |
1 row in set (0.00 sec)

Don’t forget to disable it or enable logrotate to prevent the logs files from growing too large.

Use the following at the CLI, to disable the logging, but leave the rest of the requested configs intact.

mysql> SET GLOBAL slow_query_log = ‘OFF’;
mysql> FLUSH LOGS;

To disable it permanently in the my.cnf file, set the slow_query_log to 0.


slow_query_log = 0
long_query_time = 10
log_queries_not_using_indexes = YES

Install WordPress, Nginx, PHP FPM and MariaDB on Ubuntu

Install WordPress, Nginx, PHP FPM and MariaDB on Ubuntu
Install WordPress, Nginx, PHP FPM and MariaDB on Ubuntu

You need install and configure Nginx first.

sudo apt-get update
sudo apt-get install nginx

Add below to /etc/nginx/sites-enabled/yourdomain.conf, replacing with yourdomain.conf

server {
listen *:80;

# Define default caching of 24h
expires 86400s;
add_header Pragma public;
add_header Cache-Control “max-age=86400, public, must-revalidate, proxy-revalidate”;

# deliver a static 404
error_page 404 /404.html;
location /404.html {

# Deliver 404 instead of 403 “Forbidden”
error_page 403 = 404;

# Do not allow access to files giving away your WordPress version
location ~ /(\.|wp-config.php|readme.html|licence.txt) {
return 404;

# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;

# Don’t log robots.txt requests
location = /robots.txt {
allow all;
log_not_found off;
access_log off;

# Rewrite for versioned CSS+JS via filemtime
location ~* ^.+\.(css|js)$ {
rewrite ^(.+)\.(\d+)\.(css|js)$ $1.$3 last;
expires 31536000s;
access_log off;
log_not_found off;
add_header Pragma public;
add_header Cache-Control “max-age=31536000, public”;

# Aggressive caching for static files
# If you alter static files often, please use
# add_header Cache-Control “max-age=31536000, public, must-revalidate, proxy-revalidate”;
#location ~* \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|
#wri|xla|xls|xlsx|xlt|xlw|zip)$ {
# expires 31536000s;
# access_log off;
# log_not_found off;
#add_header Pragma public;
#add_header Cache-Control “max-age=31536000, public”;
error_log /var/log/nginx/;
access_log /var/log/nginx/;

root /home/wordpress-user/;
location / {
index index.php index.html index.htm;

# get friendly url links working
if (!-e $request_filename)
rewrite ^(.+)$ /index.php?q=$1 last;

# pass all PHP files through php-fpm
location ~ \.php$ {

try_files $uri =404;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /home/wordpress-user/$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;

# deny all apache .htaccess or .htpasswd files
location ~ /\.ht
deny all;
# Deny access to hidden files
location ~ /\. {
deny all;
access_log off;
log_not_found off;

Now you need to reset the Nginx service.

sudo service nginx restart

Now we need to install PHP, PHP-FPM, PHP-GN and PHP MySQL drivers. PHP-GD is for image cropping and rotating to work.

sudo  apt get install php5-fpm php5 php5-mysql php5-gd

Next configure PHP-FPM to serve your website.

cp /etc/php5/fpm/pool.d/www.conf /etc/php5/fpm/pool.d/yourdomain.conf

Add user,  Modify the following parameters in /etc/php5/fpm/pool.d/yourdomain.conf

useradd -s /sbin/nologin usern@me
vim /etc/php5/fpm/pool.d/yoursite.conf

; Add a pool name to identify your site’.

;Modify the port for PHP-FPM to listen on
listen =

;Add the user we created earlier
user = usern@me
group = usern@me

You should restart PHP-FPM

sudo service php-fpm restart

Installing MariaDB adding it’s repository

sudo apt-get install software-properties-common
sudo apt-key adv –recv-keys –keyserver hkp:// 0xcbcb082a1bb943db
sudo add-apt-repository ‘deb [arch=amd64,i386] trusty main’
sudo apt-get update
sudo apt-get install mariadb-server

Set a root password database server. Once set login and create a wordpress user and database.

mysql -u root -p
CREATE USER wordpress-user@localhost IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON wordpress.* TO wordpress-user@localhost;

You are set to download and Install WordPress now.

cd /tmp
tar -xzvf latest.tar.gz
sudo mv wordpress /home/usern@me/
sudo chown -R usern@me:usern@me /home/usern@me/wordpress

Done, you should be able to browse WordPress site on (Replace with your domain name.)

Source and Referencing :

Difference Between IMAP and POP3


Difference between IMAP and POP3 and for how long they store mails on the mail server.

IMAP (Internet Message Access Protocol)

Using IMAP, mail server permanently stores the messages. This means that you can access them through any computer as long as you have the correct login details.

Also, unless you use a mail client that synchronizes folders and caches messages, IMAP requires a constant connection while you read email.

This method is more convenient than POP3, it generally requires more dedicated disk space than POP3 because users tend not to delete old email.

However, if  you monitor disk usage and delete old messages when necessary, IMAP is still viable on a mail server with limited resources.

Users and web host generally prefer IMAP due to its convenience. Carefully consider system’s available resources before you choose a courier.

POP (Post Office Protocol)

Using  POP3,  mail server deletes messages when you download them. That means that you can only access messages from the computer that you used to download them.

POP3 don’t require constant connection while you read email.

This system conserves your mail server’s disk resources, it limits how your users can access their email.