At some point in time, you’re probably going to have to recompile Apache and PHP. This is necessary any time you wish to upgrade to the latest version, enable or disable a module or feature.
WHM provides you with a convenient tool called EasyApache. This tool gives you the freedom to customize every little detail, if you want, or to choose from an existing configuration profile.To view the Apache Status page in WHM, perform the following steps:
To configure and rebuild Apache web server in WHM, perform the following steps:
1. Login to your Web Host Manager(WHM).
Note: You don’t know the login URL of WHM, check the steps here to access the WHM.
2. Find the Software category of the menu.
3. Click the EasyApache link.
4. It will check for updates first, then should forward you to the user interface.
5. Select a profile from the list. Check out the More Info links if you’d like more details about each one.
6. Click Build Profile Now if you’d like to go ahead and rebuild Apache and PHP without making any changes to the profile first.
7. Select the version of Apache you want to build.
8. Click Next Step to proceed.
9. Select the main versions of PHP you want to build; we’ll be sticking with PHP 5. You can choose to install both or neither if you want.
10. Click Next Step.
11. Now, select the minor version to build of each major PHP version.
12. Now, for the Short Options List. Work your way through the list, enabling or disabling whatever you want. Be sure to enable only what you need; installing too many modules can cause performance issues.
13. You’ll have to confirm most options, but we won’t show that for everyone.
14. The Frontpage Extensions for Apache have security issues and bugs. Frontpage itself has been discontinued since 2006.
15. So, we’ll turn Frontpage off.
16. Mod SuPHP is a module for PHP similar to the suEXEC module for Apache. It helps decrease the security risks involved with running PHP scripts. This option requires that PHP runs in CGI mode; enabling it will make the necessary changes automatically.
17. The IonCube Loader for PHP is required to run some PHP programs having encrypted source code.
18. ModSecurity is a web application firewall for Apache; it increases security by detecting and preventing attacks before they reach web applications. You’ll be able to configure this in WHM later, once enabled.
19. Suhosin is an advanced protection system for PHP, designed to protect servers and users from flaws in PHP itself.
20. SourceGuardian is similar to IonCube. At the bottom of this page, you have the option to Save and Build your profile as it is now.
21. Go to the Exhaustive Options List for further configuration options.
22. First on this page is the list of Apache Built-in Modules. You shouldn’t need to enable or disable these any further than we did on the previous page unless you’re certain you need to do so.This is the only PHP-related module here; the core PHP modules can be enabled or disabled further down the page.
23. Next is the Other Modules section. All of these were on the previous page, so let’s skip down to the PHP section.
24. cURL allows PHP scripts to connect to many different types of servers, such as web servers and FTP servers. Let’s enable cURL and its SSL support (for encrypted connections).
25. GD (or Graphics Draw) is a library of functions for PHP that allows programmers to create and manipulate images in a variety of different formats.
26. The Zlib module for PHP is required to install GD. Mbstring allows PHP to handle working with “multi-byte strings“. This module is required in order to work with alphabets other than Latin.
27. Mcrypt enables a number of advanced encryption algorithms. A number of the algorithms are used by governments to protect Top Secret information.
28. Closely related to Mcrypt is Mhash. Hashing algorithms are similar to encryption algorithms, with the key difference being that hashing is irreversible.
29. The MySQL “Improved” extension provides programs with more efficient access to a MySQL server and its databases. It should work with all recent versions of MySQL. Click here to enable it.
30. Enabling Safe PHP CGI prevents users from overriding your system PHP.ini settings when running PHP in CGI mode.
31. Ticking the checkbox next to TTF (FreeType) gives the GD extension better font support.
32. Here are some preferences that you should not need to change, but can if you wish.
33. If you want, you can use this form to save your settings as a custom profile that will be selectable with the rest of the profiles later on. If you don’t fill out this form, your choices will still be saved as “Previously Saved Config”.
34. Click here to Save your profile without building it or here to save and build your profile.
35. Click Yes to Confirm.
36. Acknowledge that you understand terminating the build process can cause data loss. Apache will be rendered unusable if this process is killed prematurely.
37. You will be notified of any necessary adjustments to your configuration, then forwarded automatically to the build page.
38. If you receive “Out of memory” errors below, you will need to run the build manually by command line.
39. You’ll see output from the process in this box, as the build goes on. It could take an hour or two for the build to complete, depending on your settings.
40. When the build is complete, you should see this box pop up, telling you to configure suEXEC and PHP.
41. This page allows you to choose which of the PHP versions available on your system are active.
42. You can also enable suEXEC for Apache, which decreases the security risks when running CGI and SSI programs. Note that this has no effect on PHP scripts — that’s where suPHP comes in. In order for suPHP to work, you must select it as the handler for each version of PHP you have installed. If you have both versions of PHP on your system, you’ll need to choose which is used by default to execute .php files.
43. When finished, click Save New Configuration.
44. You will be shown the settings you chose and the generated php.conf file.
45. That’s it! Apache and PHP have been re-built. If all went well, all the websites on your system should function normally.If you misconfigured anything, you can always come back here and rebuild Apache and PHP.