In order to build Apache and/or PHP, you will need to select which Apache and/or PHP modules and options you require. Documentation about specific Apache modules can be found at http://httpd.apache.org/docs/ for the version of Apache you are using.
EasyApache provides several pre-built Apache profiles (and possibly some profiles you have saved). You can select a profile based on it's description. Selecting a profile does not mean that you must use the specific options it includes, you can modify it during later steps.
After choosing the profile you wish to base your build off of, you'll want to select a version of Apache to use. Apache 1.3, 2.0 and 2.2 are supported. more information about the specific versions of Apache can be found at http://httpd.apache.org.
After choosing your Apache version, you'll need to select whether to use PHP4, PHP5, or both. Your PHP needs will be dictated by the PHP applications running on the server. After selecting a version branch of PHP, you'll need to specify the specific version (i.e. 4.4.4).
Using PHP4 and 5
If you choose to use two versions of PHP, you'll need to configure how PHP pages are processed after Apache and PHP have been installed. This is done in the WebHost Manager under Service Configuration -> Configure PHP and Suexec or on the command line using the /usr/local/cpanel/bin/rebuild_phpconf script.
At this point, you can choose to simply Save the current configuration and build Apache. However, if you wish to set up specific custom Apache or PHP options, you can do so now. Simply check or uncheck the box next to an option or module to enable or disable it. If you click on the [ ? ] next to an Apache module/option, you'll be taken to the documentation page for that module/option.
Each time Apache is built, the options you used will automatically be saved as the 'Last Saved Version'. However, If you have chosen to set up custom options/modules, you may want to save the configuration for later use. You can enter a Save As (filename), Profile Name (name to display), and a description.
For example:
After saving, these Profiles will appear in the Apache Update interface in WHM and when running /scripts/easyapache from the command line.
You can save a profile without rebuilding Apache by selecting 'Save only (Do NOT build) and then clicking on 'Next Step'. Be careful when choosing profiles to save as they will all appear in the interface and you may have to manually delete them later if you save too many.
These saved profiles can be pre-loaded later by choosing:
or you can build Apache with a specific profile without having to go through the interface steps by running:
To compile apache, select 'Save and build' and then click on 'Next Step'.
Warning: Modifying your Apache or PHP Variables can break the compilation of Apache. cPanel is not responsible for custom changes and provides no warranty of any kind with this information. Proceed with caution.
EasyApache has the ability to let you change, add, or append to any environment variables you may want. These changes must be made on the command line before running /scripts/easyapache or Apache Update through WHM.
First, create a file in /var/cpanel/easy/apache/rawenv/ with the name of the environmental variable.
For example, you could edit the PATH variable by creating /var/cpanel/easy/apache/rawenv/PATH. The contents of this file should be the value of the variable. Assuming your desired $PATH is '/bin:/usr/bin:/sbin:/usr/sbin', the file would contain only: /bin:/usr/bin:/sbin:/usr/sbin
However, for the PATH variable, it is not ideal to replace it as your path needs might change. Instead, you can append your PATH change by creating a /var/cpanel/easy/apache/rawenv/.append_PATH file. In that file, simply place the path you wish to append to $PATH. For example: :/home/bin
You can also prepend variables by adding a .prepend_VARIABLE file.
Warning: Modifying your configure flags can break the compilation of Apache. cPanel is not responsible for custom changes and provides no warranty of any kind with this information. Proceed with caution.
EasyApache also allows you to specify any configure option supported by Apache and/or PHP. To add configuration options, simply place the option in the appropriate file (one option per line, format: option=value):
If the file contains the following lines:
Build profiles are saved in /var/cpanel/easy/apache/profiles/custom/. They are named '{profilename}.yaml'. Simply rsync/scp/ftp the appropriate .yaml files (to the same directory on the new server) between your servers to distribute a build profile. Or once you've configured the profile, place it on a distribution server so you can suck it down with wget,sftp,etc.
Example of automating this:
Just like Build Profiles, simply copy over the appropriate files to the same directory on the server you wish to use the flag or variable on.