Install Imunify Anti Virus on Cpanel Server

ImunifyAV is a free Antivirus for Cpanel servers by CloudLinux.

https://www.imunify360.com/antivirus

To install Imunify Anti Virus on Cpanel CloudLinux server, run

On non CLoudLinux servers, run

For Plesk, it is available as an extension

https://www.plesk.com/extensions/revisium-antivirus-2/

See cloudlinux

CloudLinux EasyApache 4 Profile Missing

On CloudLinux server, EasyApache profile was missing.

WHM shows following error message

Re installing ea-profiles-cpanel did not help.

The issue is resolved by running

See Cpanel

Install LiteSpeed Web Server on Cpanel Server

To install LiteSpeed Web Server on Cpanel Server, run

This will instal 15 day TRAIl version of the LiteSpeed Web Server. Once you purchased license, you will be able to update license key in WHM.

LiteSpeed Web Server installed on folder

To restart LiteSpeed, run

Once LiteSpeed installed, you need to switch to LiteSpeed by running

You can also do this in WHM.

You can login to web interface at

You will need admin password to login here, to set admin password, run

CloudLinux lasapi php

Enable CloudLinux PHP lsapi

CloudLinux provides high performance PHP module lsapi. It is a replacement for suphp available on cpanel servers. lsapi module is a based on LiteSpeed Technologies API for PHP.

To enable lsapi in CloudLinux Cpanel Server, go to

Provision profile

CloudLinux lasapi php

Click “Provision” and wait until the software is updated.

Now you need to set lsapi as default PHP handler. To do this, go to

WHM Multi PHP Manager

Click on “PHP Handlers”.

On Next page, you can set handler for each PHP versions.

You can set PHP handler to lsapi gloabally using following command

Once you run it, all PHP version handlers will get chanegd to lsapi.

If you check PHP info, you will see Server API listed as LiteSpeed.

LiteSpeed Server API

cpanel-php

Cpanel Server Disk Partition

Many server providers setup server with smaller / partition like 20 GB. This is fine for normal Linux Servers, you will need more disk space on Cpanel Servers. Many use CloudLinux on Cpanel Servers, this will require you to have more free disk space on / partition.

The partition i use for Cpanel Servers are

I don’t create seperate partition for /usr and /var as this will use up more space, may end up one of the partition get filled up while other have lot of free space. Having one partition for /, you don’t need to worry much.

Another partition scheme is give everything to /

Install mod_remoteip in Cpanel Server

To install mod_remoteip in Cpanel Server, run

Edit file

Add

Restart Apache.

At this stage, PHP applications will show proper visitor IP address.

Apache access logs will still show proxy server IP. To fix this, edit Apache configuration file.

Find

Replace with

Restart Apache

PHP mails not working on Cpanel Server

On a cpanel server, PHP scripts can’t sent email. Incoming and outgoing emails for email users (mailbox) are working properly.

To debug, loggged in to SSH as one of the cpanel user.

If SSH access is not enabled, enable SSH in WHM.

Once logged in, verify sendmail works.

I get above error message. This is because permission error with /usr/sbin/sendmail.

To fix, run

If you are using CloudLinux CageFS, try disable and see if it works. If it work after you disable CafeFS, run

Install SourceGuardian in Cpanel Server

To install sourceguardian PHP loaders in Cpanel server, run

Install SSL for Cpanel Server Hostname

Cpanel will provide Free SSL for server hostname if server hostname resolve to servers main IP address and server have valid cpanel license.

Cpanel will check for hostname SSL when upcp runs. This is run once everyday.

You can manually run SSL check by running

If you have a paid SSL, you can install it in

WHM > Service Configuration > Manage Service SSL Certificates