Reinstall Apache cPanel Servers
When EasyApache 3 was about it was easy to reinstall Apache in your cPanel server. You could select it and unselect it to install and reinstall Apache but now EasyApache 4 is about you can no longer do this.
If you have made changes to Apache, for example, installing a caching plugin and this has caused a problem with Apache it is still possible to reinstall Apache from the command line.
Following this guide will cause a slight outage in your server but any problems with Apache should be resolved one the reinstalled is completed. If you use a PHP Handler like suPHP you will have to select this again as cPanel will revert to CGI and permission errors might be seen.
Log in as the root user or a user with root privileges and issue the below command. You will notice the dependencies for suPHP are also removed. These will be installed again later.
yum remove ea-apache24
Next, reinstall Apache cPanel with yum.
yum install ea-apache24
If you are using suPHP in your cPanel VPS then some dependencies got uninstalled with Apache in the first step. There are two ways to install them again.
Login to WHM and select EasyApache 4. Select customize next to your profile and compile in Mod_suexec and Mod_suphp. Update your other software while you are here. You can also install these from yum.
yum install ea-apache24-mod_suexec yum install ea-apache24-mod_suphp
Set PHP Handler
Now ensure you have the correct PHP handler set in WHM and the MultiPHP Manager. If you are already using CGI this step is not needed but if you where using suPHP you will need to select this again for your PHP versions.
Check to ensure your cPanel server is secured with a free firewall to prevent brute-force attacks and other malicious activity.
How was this article – Reinstall Apache cPanel
You might also like
More from cPanel
The domain already exists in the userdata When you add an account to WHM, WHM will check to ensure that the …