Page tree
Skip to end of metadata
Go to start of metadata

Overview

The 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.

Recommendation format

The system stores its recommendations in an RPM inside the ea-cpanel-tools package. This package creates directories and files in the /etc/cpanel/ea4/recommendations/ directory. The RPM 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:

  {
   "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:

FieldDescriptionAccepted values
on

Required.

The action that triggers a recommendation.

Note:

You can only use this field in the top level of the JSON file.

  • add
  • remove
desc

The package's description.

Note:

You can only use this field in the top level of the JSON file.

A valid string.
url

A URL that provides more information.

Note:

You can use this field in both the top level of the JSON file and the options hash.

A valid URL.
name

Required.

The package's label.

Note:

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.

Note:

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

An array of information that corresponds with the text field.

Note:

You can only use this field in the options hash.

A valid array.
recommended

The type of recommendation that the interface returns.

Notes:

  • 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.

Note:

You can only use this field in the options hash.

A valid string.
level

The level that triggers a recommendation to appear. This level is based on Bootstrap 3 alert components.

Notes:

  • 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

The user interface filters the recommendations it displays with the array of keywords.

Note:

You can only use this field in the top level of the JSON file.

An array of valid keywords.

Additional documentation