We do support Round the Clock 24 x 7 x 365 (+91) 883 012 3924
header-image

L3 Web Hosting Blog

cPanel, Plesk, Wordpress Hosting SSD disk

Check out L3WebHosting blog for tips and in-depth articles on web hosting services !!

How to Install or Uninstall EasyApache 4

If your system runs EasyApache 3, you must update to EasyApache 4 as cPanel will no longer update EasyApache 3.

The EasyApache 4 Migration Tool allows you to migrate to EasyApache 4.
EasyApache 4 supports PHP versions 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3 and Apache version 2.4.

Follow below steps to migrate your cPanel server from EasyApache 3 to EasyApache 4 :

# Login to WHM with root user >> Home >> Software >> “EasyApache 4”
# Click “Migrate”.
# Click on “Yes” to run EasyApache 4 Migration.
It will start the EasyApache 4 migration and display the progress log on the screen.
# Click “Done”. You can download the progress log.

You can do the same from SSH :
# Login to SSH shell with root user
# Enter below command :

/usr/local/cpanel/scripts/migrate_ea3_to_ea4 –run

You can contact us at esupport@L3webhosting.com if you require any further assistance.

Create DNS records for Office365

To setup Office365 with your domain you need to create below DNS records :

# First you need to validate domain with TXT or MX record :

If you create a TXT record, use these values:

Record Type Alias or Host Name Value TTL
TXT Do one of the following: Type @ or leave the field empty or type your domain name.
**Note:**Different DNS hosts have different requirements for this field. MS=ms XXXXXXXX
Note: This is an example. Use your specific Destination or Points to Address value here, from the table in Office 365.
Set this value to 1 hour or to the equivalent in minutes ( 60 ), seconds ( 3600 ), etc.

 

If you create an MX record, use these values:

Record Type Alias or Host Name Value Priority TTL
MX Type either @ or your domain name. MS=ms XXXXXXXX
**Note:**This is an example. Use your specific Destination or Points to Address value here, from the table in Office 365.
For Priority, to avoid conflicts with the MX record used for mail flow, use a lower priority than the priority for any existing MX records. Set this value to 1 hour or to the equivalent in minutes ( 60 ), seconds ( 3600 ), etc.

 

Once you have validated domain we need to below DNS records :

# Add MX record to route email to Office365

Setup MX record like below
<MX token>.mail.protection.outlook.com

where <MX token> is a value like MSxxxxxxx.

# Add three CNAME records

Record Type Host Points to TTL
CNAME (Alias) autodiscover autodiscover.outlook.com 1 hour
CNAME (Alias) lyncdiscover webdir.online.lync.com 1 hour
CNAME (Alias) sip sipdir.online.lync.com 1 hour

# Add two CNAME records for Mobile Device Management (MDM) for Office 365

Record Type Host Points to TTL
CNAME (Alias) enterpriseregistration enterpriseregistration.windows.net 1 hour
CNAME (Alias) enterpriseenrollment enterpriseenrollment-s.manage.microsoft.com 1 hour

# Add a TXT record for SPF to help prevent email spam

Record Type Host TXT Value TTL
TXT (Text) @ v=spf1 include:spf.protection.outlook.com -all 1 hour

# Add two SRV records

Record Type Name Target Protocol Service Priority Weight Port TTL
SRV (Service) @
(Or leave blank, if @ is not allowed)
sipdir.online.lync.com _tls _sip 100 1 443 1 hour
SRV (Service) @
(Or leave blank, if @ is not allowed)
sipfed.online.lync.com _tcp _sipfederationtls 100 1 5061 1 hour

Please feel free contact us at support@L3webhosting.com if you require any assistance to setup office365.

 

ModSecurity Tools in WHM

In WHM, ModSecurity Tools interface allows you to add and manage ModSecurity rules for your server.

You need to first install ModSecurity Apache module in order to use this feature.
# WHM >> Home >> Software >> EasyApache 4
OR
You can install ModSecurity Apache module through below command :
# yum install ea-apache24-mod_security2

Follow below steps to ADD ModSecurity rule :

  1. Click “Add Rule. A new interface will display.
  2. Enter the rule in the “Rule Text text box.
  3. To enable the rule when you deploy the configuration, select the “Enable Rule checkbox.
  4. To deploy the rule and restart Apache immediately, select the “Deploy and Restart Apache checkbox.
  5. Click “Save.

Follow below steps to EDIT a rule :

  1. Click “Edit ” for the rule that you wish to update.
  2. Make the desired changes in the Rule Text”  text box.
  3. Click “Save“.

Follow below steps to COPY a rule :

  1. Click “Copy for the rule that you wish to update.
  2. Make any desired changes in the “Rule Text text box.
  3. Click “Save.

Follow below steps to DELETE a rule :

  1. Click “Delete for the rule that you wish to delete.
  2. Click “Delete to confirm your action.

To enable or disable a ModSecurity rule, click “Enable or “Disable in that rule’s row.

If you need any further assistance please do contact our support department at support@L3webhosting.com

 

How to access WHM panel without root password

If you have the shell access to cPanel server through SSH Key pair and you want to access WHM without knowing root password then this post will help you.

With the help of “WHMAPI1” utility we can create a temporary WHM root session by using the following command :

root@L3server.com [~]# whmapi1 create_user_session user=root service=whostmgrd locale=en

Above command will generate URL.

Copy that WHM URL and put it in the browser, you should be able to access WHM without root password. This will be a one time user session to access the WHM.

If you would like to access the reseller WHM account simply replace the ‘user’ name as the reseller account username from the root.

root@server.L3ser.com [~]# whmapi1 create_user_session user=reseller service=whostmgrd locale=en

If you need any further assistance please do contact our support department at support@L3webhosting.com

 

WARNING: RESTRICT_SYSLOG is disabled. See SECURITY WARNING in Firewall Configuration

 

If you are receiving above “SECURITY WARNING” warnning for CSF firewall then you can follow below steps to resolve this error.

1) Login to WHM with root user and navigate to Home >> Plugins.

2) Click on the option ‘ConfigServer Security & Firewall’.

3) A new window will open and Click the option ‘Firewall Configuration’ from there.

4) Set RESTRICT_SYSLOG to 3.

5) Save and Restart CSF.

If you need any further assistance please do contact our support department at support@L3webhosting.com

Enable Apache PHP-FPM for cPanel & WHM server

PHP FastCGI Process Manager (PHP-FPM) is an alternative FastCGI daemon for PHP that allows a website to handle high loads. PHP-FPM maintains pools (workers that can respond to PHP requests) to accomplish this. PHP-FPM is faster than traditional CGI-based methods such as SUPHP for multi-user PHP environments.

In the cPanel & WHM 76 version and later, the cPanel system enables PHP-FPM by default on a newly installed cPanel server. The cPanel system will automatically enable PHP-FPM for all websites that you add on the cPanel server.

To work PHP-FPM properly, your server requires at least 2 GB of RAM.
If the system finds less than 2 GB of available RAM, it will not enable Apache PHP-FPM by default.
If you enable PHP-FPM on a server with less than the required RAM, your server may experience severe performance issues.

The following behaviors affect installations of cPanel & WHM that you upgrade or transfer to cPanel version 76 :

  • Systems that upgrade to version 76 will retain the Apache PHP-FPM settings from the previous version.
  • Accounts that you transfer to a server with a new cPanel & WHM version 76 installation will use the new installation’s Apache PHP-FPM settings.

You can enable or disable Apache PHP-FPM for individual cPanel accounts or server wide through WHM.
# Login to WHM
# Go to Software >> MultiPHP Manager
# Click Turn On/Off under the System PHP-FPM section
It will enable or disable Apache’s PHP-FPM for all domains.
# Select the cPanel domain name from domain list to enable or disable PHP-FPM for an individual domain. 

 

How to change cPanel WHM Port

The default port numbers for cPanel and WHM are given below :

cPanel : 2082 / 2083 (SSL)
WHM : 2086 / 2087 (SSL)

Please follow below steps to change the default port number to any value.

# SSH to cPanel server with root user

# Open “/var/cpanel/cpanel.config” file and change the default port number

port=2082

# Run the following commands after changing the default port value with new port number

/usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings
/etc/init.d/httpd restart

# Ensure new port number is opened into the firewall
# Now you can access cPanel & WHM with new port number.

 

How to Remove Old Kernels on Centos

If you want to remove old kernels for any reason you can follow below steps.

First, you need to install yum-utils package on your server to clean up older kernels and configure yum not to keep too many versions.

yum install yum-utils

Now, check the list of kernels that you have installed:

rpm -q kernel

Run below command to keep only two of the latest kernels

package-cleanup --oldkernels --count=2

To make the permanent changes when installing & updating kernels via yum command, edit /etc/yum.conf file with below line :

installonly_limit=2

 

How to Change Language for WordPress website

If you want to keep the Dashboard in “English” but at the same time to display the website in another language for the visitors? If yes then this blog post is useful for you.

# Login to the wp-admin WordPress Dashboard

# Click Settings in the navigation menu then click the General link

# Click the drop-down menu next to “Site Language” and choose your preferred language

# Click the “Save” Changes button.

Now you will see the website displayed in the language you selected.