In AlmaLinux 9, memcached only listen on loop back interface IP address (127.0.0.1,::1). If your configuation don’t restrict memcache to listen to 127.0.0.1, change your options line as follows.
OPTIONS="-l 127.0.0.1 -U 0"
This will restrict memcached to listen on IP address 127.0.0.1 and -U 0 disable UDP. This is done to protect memcachd installation from attacks.
When using Cloudflare, website visitors visit the Cloudflare CDN server configured as a reverse proxy server. Cloudflare CDN server fetches pages from your web server and caches them for a while, serving them to subsequent visitors. Your web application may report Cloudflare CDN server IP ad visitor IP as all requests to your website are coming from Cloudflare CDN. This can be a problem when you have an e-commerce website where you need to check visitor IPs to detect fraud signups/orders.
To restore the original visitor IP for visitors on cPanel Server running the Apache web server, you can use mod_remoteip. You can install mod_remoteip in WHM > EasyApache 4 > Apache Modules
You can also install mod_remoteip using command line
dnf install ea-apache24-mod_remoteip
Login to SSH as user root or WHM > Terminal, then edit the file
vi /etc/apache2/conf.modules.d/370_mod_remoteip.conf
CentOS Linux was discontinued at the end of 2021 in favor of CentOS Stream. CentoS 7 will continue to be supported through the remainder of the RHEL 7 life cycle, which will end on June 30, 2024. If you are using CentOS 7 server with cPanel, it is better to upgrade to AlmaLinux 8, which is a clone of RHEL 8 supported by cPanel.
cPanel provides an open-source script to upgrade your CentOS 7 installation to AlmaLinux.
Benchmarking a server helps to determine its performance score. By benchmarking a server, you can also compare its performance score with other servers. Benchmarking can also help identify any issues with the server that may be causing poor performance, such as faulty hardware or software.
To benchmark a Cpanel Server, I will use Geekbench 5.
What the script will do is stop MySQL, Apache and Cpanel, then run the greekbench. After benchmarking is completed Apache, MySQL and Cpanel will be started.
To start the benchmark, run following command.
benchmark.sh
IMPORTANT: when you run benchmark, web server stop serving websites, so only do this when you have less visitors like night time or during server setup.
After the benchmark is finished, scroll up, you will see benchmark result like the following
You can find server benchmarks results i have taken at
You can also use the search box in WHM, and search for “MariaDB upgrade”.
On this page, select the MySQL or MariaDB version you need. Then click on the “Continue” button.
It will show some warnings related to MySQL/MariaDB changes. You need to check all check boxes, then click on the “Continue” button.
On this page, you get 2 options “Unattended Upgrade” and “Interactive Upgrade”. You can select any of it and click the “Continue” button to do the upgrade.
mcrypt is a PHP module, that was DEPRECATED in PHP 7.1.0, and REMOVED in PHP 7.2.0. mcrypt is removed from PHP, now it is available as a PECL module at
Symlink attack exploits the way Linux operating systems handle symbolic links (symlinks). A symlink is a pointer to another file or directory that is used by the operating system to access the linked file or directory. In a symlink attack, an attacker creates a symbolic link that points to a file or directory that the attacker does not have permission to access. When the web server attempts to access the linked file or directory, the attacker can gain access to it.
Symlink attacks can be used to gain access to sensitive data. On a Cpanel Server, hackers usually create a symlink to common configuration files used by popular CMS on other hosting accounts on the same server. With this hackers can get database credentials of other websites hosted on the server. Many CMS store user credentials in the MySQL database, and they will be able to change passwords and gain access to websites.
Solution 1: CloudLinux CageFS (Paid)
The best way to prevent a symlink attack on the Cpanel server is to use CloudLinux CageFS, this isolates each site into its own isolated areas, so one website’s files won’t be able to another site.
Solution 2: mod_ruid2
If you are not using CloudLinux, you can use the following method to protect against the symlink attack. mod_ruid2 is an Apache module, that can be enabled in EasyApache 4.
In WHM > Software > EasyApache 4, enable mod_ruid2.
Under WHM > Server Configuration > Tweak Settings, enable jail Apache
Go to WHM > Security Center > Security Advisor, and install KernelCare’s Free Symlink Protection.
If you enable SSH access for cPanel accounts, make sure it is “jailed Shell” under WHM > Account Functions > Manage Shell Access
Cpanel control panel recently started supporting Ubuntu Operating System. Ubuntu support was announced after RedHat stopped supporting RHEL-based CentOS. When I install Cpanel on Ubuntu 20.04 server, I got the following error message
Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/x86_64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /home/cPanelInstall/selfgz1202/install line 12.
BEGIN failed--compilation aborted at /home/cPanelInstall/selfgz1202/install line 12.
To fix the error install package “libfindbin-libs-perl” with apt
PHP ssh2 module allows you to connect to SSH servers. On Cpanel servers, this module is not available under EasyApache. You need to install using PECL. The PECL module installer in WHM does not list this module. The module is available to download from
If you need to install SSH module for another PHP version, change ea-php74 to whatever PHP version you are using. Make sure you select the appropriate ssh2 module version that works with the PHP version you are using.
After installing, restart Apache with
systemctl restart httpd
To verify the ssh2 module is installed, create a PHP file with phpinfo() function, you will see.