EasyApache 4 Recommendations

Last modified: September 12, 2024


Overview

WHM’s EasyApache 4 interface (WHM » Home » Software » EasyApache 4) gives you a variety of information about the packages that you can install. This could include security advice or notes about your configuration. For more information on PHP version recommendations, read our How to Set PHP Version Recommendations documentation.

Recommendation format

The system stores its recommendations inside the ea-cpanel-tools package. This package creates directories and files in the /etc/cpanel/ea4/recommendations/ directory. The package contains JSON-formatted files for each recommendation. It places each file in a directory with the same name as the corresponding package.

The recommendation file will resemble the following example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
   "on" : "add",
   "name" : "PHP DSO",
   "desc" : "PHP DSO runs as the user by default. In a shared hosting environment, this is a security issue.",
   "level" : "danger",
   "url" : "https://www.example.com",
   "options" : [
      {
         "recommended" : true,
         "text" : "We strongly recommend that you install one of the following packages unless this is a single-user system:",
         "level" : "success",
         "items" : [
            "ea-apache24-mod_ruid2",
            "ea-apache24-mod_mpm_itk"
         ]
      },
      {
         "recommended" : false,
         "text" : "If you use suPHP, you will add some security, but may experience performance issues on your server.",
         "level" : "warning"
      }
   ]
}

Recommendation file fields

The JSON file contains the following fields:

Field Required Description Accepted values
on Required The action that triggers a recommendation.

You can only use this field in the top level of the JSON file.
  • add
  • remove
desc Optional The package’s description.

You can only use this field in the top level of the JSON file.
A valid string.
url Required A URL that provides more information.

  • If no URL exists, use the false value.
  • You can use this field in both the top level of the JSON file and the options hash.
  • A valid URL.
  • false
name Required The package’s label.

You can only use this field in the top level of the JSON file.
A valid string.
options Required The options to resolve a recommendation.

You can only use this field in the top level of the JSON file.
An array of hashes that contains the level, items, recommended, text, and url fields.
items Optional An array of information that corresponds with the text field.

You can only use this field in the options hash.
A valid array.
recommended Optional The type of recommendation that the interface returns.

  • This field determines which icon displays next to the text in the interface. If you do not include this field, then the interface will not display an icon.
  • You can only use this field in the options hash.
  • true
  • false
text Required The text returned in the user interface.

You can only use this field in the options hash.
A valid string.
level Optional The level that triggers a recommendation to appear. This level is based on Bootstrap 3 alert components.

  • You can use this field in both the top level of the JSON file and the options hash.
  • The danger level is the only value that affects the UI.
  • primary
  • success
  • info
  • warning
  • danger
filter Optional The user interface filters the recommendations it displays with the array of keywords.

You can only use this field in the top level of the JSON file.
An array of valid keywords.

Additional Documentation