How to configure and rebuild Apache web server in WHM – Support
  1. Home
  2. Web Hosting
  3. Control Panel
  4. WHM
  5. How to configure and rebuild Apache web server in WHM

How to configure and rebuild Apache web server in WHM

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.

How to configure and rebuild Apache web server in WHM
3. Click the EasyApache link.

How to configure and rebuild Apache web server in WHM
4. It will check for updates first, then should forward you to the user interface.

How to configure and rebuild Apache web server in WHM
5. Select a profile from the list. Check out the More Info links if you’d like more details about each one.

How to configure and rebuild Apache web server in WHM
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.

How to configure and rebuild Apache web server in WHM
7. Select the version of Apache you want to build.

How to configure and rebuild Apache web server in WHM
8. Click Next Step to proceed.

How to configure and rebuild Apache web server in WHM
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.

How to configure and rebuild Apache web server in WHM
11. Now, select the minor version to build of each major PHP version.

How to configure and rebuild Apache web server in WHM
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.

How to configure and rebuild Apache web server in WHM
13. You’ll have to confirm most options, but we won’t show that for everyone.

How to configure and rebuild Apache web server in WHM
14. The Frontpage Extensions for Apache have security issues and bugs. Frontpage itself has been discontinued since 2006.

How to configure and rebuild Apache web server in WHM
15. So, we’ll turn Frontpage off.

How to configure and rebuild Apache web server in WHM
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.

How to configure and rebuild Apache web server in WHM
17. The IonCube Loader for PHP is required to run some PHP programs having encrypted source code.

How to configure and rebuild Apache web server in WHM
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.

How to configure and rebuild Apache web server in WHM
19. Suhosin is an advanced protection system for PHP, designed to protect servers and users from flaws in PHP itself.

How to configure and rebuild Apache web server in WHM

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.

How to configure and rebuild Apache web server in WHM
21. Go to the Exhaustive Options List for further configuration options.

How to configure and rebuild Apache web server in WHM
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.

How to configure and rebuild Apache web server in WHM
23. Next is the Other Modules section. All of these were on the previous page, so let’s skip down to the PHP section.

How to configure and rebuild Apache web server in WHM
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).

How to configure and rebuild Apache web server in WHM
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.

How to configure and rebuild Apache web server in WHM
26. The Zlib module for PHP is required to install GDMbstring allows PHP to handle working with “multi-byte strings“. This module is required in order to work with alphabets other than Latin.

How to configure and rebuild Apache web server in WHM
27. Mcrypt enables a number of advanced encryption algorithms. A number of the algorithms are used by governments to protect Top Secret information.

How to configure and rebuild Apache web server in WHM
28. Closely related to Mcrypt is Mhash. Hashing algorithms are similar to encryption algorithms, with the key difference being that hashing is irreversible.

How to configure and rebuild Apache web server in WHM
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.

How to configure and rebuild Apache web server in WHM
30. Enabling Safe PHP CGI prevents users from overriding your system PHP.ini settings when running PHP in CGI mode.

How to configure and rebuild Apache web server in WHM
31. Ticking the checkbox next to TTF (FreeType) gives the GD extension better font support.

How to configure and rebuild Apache web server in WHM
32. Here are some preferences that you should not need to change, but can if you wish.

How to configure and rebuild Apache web server in WHM
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”.

How to configure and rebuild Apache web server in WHM
34. Click here to Save your profile without building it or here to save and build your profile.

35. Click Yes to Confirm.

How to configure and rebuild Apache web server in WHM
36. Acknowledge that you understand terminating the build process can cause data loss. Apache will be rendered unusable if this process is killed prematurely.

How to configure and rebuild Apache web server in WHM
37. You will be notified of any necessary adjustments to your configuration, then forwarded automatically to the build page.

How to configure and rebuild Apache web server in WHM

38. If you receive “Out of memory” errors below, you will need to run the build manually by command line.

How to configure and rebuild Apache web server in WHM

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.

How to configure and rebuild Apache web server in WHM

40. When the build is complete, you should see this box pop up, telling you to configure suEXEC and PHP.

How to configure and rebuild Apache web server in WHM
41. This page allows you to choose which of the PHP versions available on your system are active.

How to configure and rebuild Apache web server in WHM
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.

How to configure and rebuild Apache web server in WHM

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.

Updated on June 9, 2016

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment