IndexConfigurationVirtual servers

Virtual Server: Rules

Besides the connection handler set for the rule, there are other parameters that can be set in order to customize the rule behavior. This menu offers the following tabs:

  1. Rule: this is the rule type, as explained in the Virtual servers section.

  2. Handler: It allows to fine tune the behavior of any of the available handlers. Since so many options are available, refer to the complete list of handlers shipped with Cherokee.

  3. Encoding: to manage the compression of the contents to be sent.

  4. Expiration: to manage the configuration of HTTP Cache headers used to identify cacheable content.

  5. Security: in this section one can configure Access Restrictions and Authentication.

Encoding

The content sent by Cherokee can be encoded or not. This tab is used to configure, on a per-rule basis, what encoders, if any, are to be applied.

You can set up the encoding method to use, and it shall be applied to whatever content is handled by the parent rule.

Whenever you set up a virtual server, creating a rule where gzip is enabled by default for the following file types: html, htm, txt, css and js is a good idea. You are encouraged to use this. Hardware is cheap. Bandwidth is not.

Expiration

HTTP/1.1 defines caching methods in HTTP. Cherokee-Admin can automatically adjust the Cache-Control and Expire headers depending on the values you have configured. The available options are:

  1. Not set: Does not write the caching headers.

  2. 1970: Corresponds to the Unix Epoch.

  3. 2038: Maximum date value representable in POSIX time.

  4. Custom Value: set a value by hand.

Access Restrictions

Examples

Authentication

This parameter allows to configure user/password protected entries. A validator has to be used in each Auth entry in order to specify the validaton mechanism. The following validators are available:

It is important to take into consideration that there are two different authentication mechanisms:

Some validators can only handle one of those mechanisms because of techical limitations. In case the module supports both of them, the interface allows to choose whether one or both are to be used.