Read More

Server General

General settings for the load balancer. When a path information is required, it can be either absolute or relative to $SERVER_ROOT. $SERVER_ROOT is the location where LiteSpeed load balancer is installed. For examples, it can be your_home_dir/lslb, /opt/lslb, or etc. The load balancer executable is under $SERVER_ROOT/bin.

Table of Contents

Server Process

Server Name | Number of Processes | Running As | Priority | Chroot Path | Enable chroot | Max I/O Buffer Size | Swapping Directory

General Settings

Disable Initial Log Rotation | Server Signature | Hide Error Page Signature | Enable GeoLocation Lookup | Use Client IP in Header | Header Operations | Check For Update | Download Updates | Administrator Email

MaxMind GeoIP DB

DB File Path | DB Name | Environment Variables

IP2Location DB

IP2Location DB File Path | DB Cache Type

Server Name

Description

A unique name for this server. You can use $HOSTNAME as value.

Number of Processes

Description

[Only Available For Web ADC Ultimate Licenses]
Specifies the number of lslbd workers. Enter 0 to have this number be decided automatically.

Syntax

Integer value between 0 and 128.

Tips

Set an appropriate number to suit your needs. Adding more processes may not necessarily mean better performance.

Running As

Description

Specifies the user/group that the server process runs as. This value is set during installation. In order to change it, you must download the installation package and perform an upgrade via the command line.

Apply

Reinstall required.

Tips

Server should not be run as a privileged user, such as "root". It is critical that the server is configured to run as an un-privileged user/group combination that does not have login/shell access. A user and group of nobody is generally a good choice.

Priority

Description

Specifies priority of the server processes. Value ranges from -20 to 20. A lower number equates to a higher priority.

Syntax

Integer number

Tips

Usually a higher priority leads to slightly higher web performance on a busy server. Do not set priority higher than that of database processes.

Chroot Path

Description

Specifies the directory where the chroot environment is rooted. Only "root" user can run the server in chroot mode. Whether to run in chroot mode is controlled by Enable chroot option. The installer program will set up the initial chroot environment automatically. This entry is read-only, and if you want to change it, please run the installer again from the command line.

In the chroot environment, the server and its child processes cannot access file systems outside of the chroot jail. Chroot is an advanced security feature and additional administration may be required to make it work properly. All required executables, libraries, configuration files, and device files should be recreated within the chroot jail.

As the root directory is changed, you need to pay special attention to path configuration when an absolute path is used. A Unix domain socket or swapping directory is always relative to the new root directory. All other path configurations are always relative to the real root.

Apply

Reinstall required.

Tips

Use chroot for better security.

Enable chroot

Description

Specifies whether to start the server in chroot mode. The new root directory is set by Chroot Path during installation.

Syntax

Select from radio box

Max I/O Buffer Size

Description

Specifies the maximum buffer size that is used to store a request body and its dynamically generated response. When this limit is reached, the server will start to create temporary swapping files under Swapping Directory.

Syntax

Integer number

Tips

Set the buffer size large enough to accommodate all concurrent requests/replies to avoid memory to disk swapping. If there is frequent I/O activity to the swap directoy, by default /tmp/lshttpd/swap/, this buffer size is too low and LiteSpeed is swapping to disk.

See Also

Swapping Directory

Swapping Directory

Description

Specifies the directory where the swapping files should be placed. When the server is started in chroot mode, this directory is relative to the new root directory, otherwise it is relative to the real root directory.

The server uses its own virtual memory to reduce system memory usage. Virtual memory and disk swapping are used to store large request bodies and dynamically generated responses. The swapping directory should be placed on a disk with enough space.

Default value: /tmp/lslbd/swap

Syntax

Absolute path

Tips

Place the swapping directory on a separate disk or increase Max I/O Buffer Size to eliminate swapping.

See Also

Max I/O Buffer Size

Disable Initial Log Rotation

Description

Specifies whether to enable/disable rotation of server error log file at startup. Initial log rotation is enabled by default when using value "Not Set".

Syntax

Select from radio box

Server Signature

Description

Specifies whether to show the server signature and version number in the response header's "Server" value. There are three options: when set to Hide Version, only LiteSpeed is shown. When set to Show Version, LiteSpeed and the version number are shown. When set to Hide Full Header, the entire Server header will not be shown in the response header.

Syntax

Select from drop down list

Tips

Set to Hide Version if you do not wish to expose the server version number.

Hide Error Page Signature

Description

Specifies whether or not to show the lines

Powered By LiteSpeed.
LiteSpeed Technologies is not responsible for administration and contents of this web site!"
on your default error pages.

Syntax

Select from radio box

Enable GeoLocation Lookup

Description

Specifies whether to enable/disable IP Geolocation lookup. Can be set at server, virtual host, or context level. IP Geolocation is disabled by default when using value "Not Set".

Syntax

Select from radio box

See Also

Use Client IP in Header, DB File Path,

Use Client IP in Header

Description

Specifies whether to use the first most valid IP IP address listed in the "X-Forwarded-For" HTTP request header for all IP address-related features, including connection/bandwidth throttling, access control, and IP geolocation.

This feature is useful if your web server is behind a load balancer or a proxy server. If you select Trusted IP Only, then X-Forwarded-For IP will be used only when the request is coming from trusted IPs defined in the server-level Allowed List.

Keep Header from Trusted IP is the same as Trusted IP Only, but the X-Forwarded-For header used for the backend will not be modified to include the connecting peer address.

Use Last IP (for AWS ELB) will use the last IP address in the "X-Forwarded-For" list. Select this option if you are using AWS Elastic Load Balancer or expect the real IP to appended to the end of the "X-Forwarded-For" list.

Syntax

Select from drop down list

Header Operations

Description

Specifies additional response/request headers to be added. Multiple header directives can be added with one directive per line. "NONE" can be used to disable parent header inheritance. If no directive is provided 'Header' is assumed.

Syntax

[Header]|RequestHeader [condition] set|append|merge|add|unset header [value] [early|env=[!]variable]

Example

set Cache-control no-cache
append Cache-control no-store
Header set My-header cust_header_val
RequestHeader set My-req-header cust_req_header_val

Tips

Syntax and usage are similar to Apache's mod_headers directives for supported operations.

The 'Header' directive is is optional and can be excluded or left in when copying rules from elsewhere without issue.

Check For Update

Description

Specifies how often the update agent will check for a new product release. Options are "Daily", "Weekly", "Monthly" and "Disable".

Syntax

Select from drop down list

Download Updates

Description

Specifies whether to auto-download a new product release package file when available. If a new package has been successfully downloaded, an online one-click upgrade can be performed via the WebAdmin console under Service Manager - Version Management.

Syntax

Select from drop down list

Administrator Email

Description

Specifies the server administrator's email address(es). If specified, administrators will be notified by email of important events (for example, when the LiteSpeed service is restarted automatically due to crash detection or when license is expiring).

Syntax

Comma delimited list of email address.

Tips

Email alert feature will only work if the server has an active MX server such as postfix, exim, or sendmail.

MaxMind GeoIP DB

Description

Multiple MaxMind geolocation databases can be specified here. MaxMind has the following type of DBs: Country, Region, City, Organization, ISP and Netspeed. If multiple databases of types "Country", "Region", and "City" are configured, the last configuration will be effective.

DB File Path

Description

Specifies the path to MaxMind GeoIP database.

Syntax

Absolute path

Example

/usr/local/share/GeoIP/GeoLite2-Country.mmdb

DB Name

Description

MaxMind GeoIP database name. As of GeoIP2, this setting is required.

When upgrading from a GeoIP to a GeoIP2, using values "COUNTRY_DB", "CITY_DB", or "ASN_DB" for this setting will automatically populate PHP's $_SERVER variable with some GeoIP compatible entries (listed by DB Name value below) to help ease this transition.

CITY_DB: 'GEOIP_COUNTRY_CODE', 'GEOIP_COUNTRY_NAME', 'GEOIP_CONTINENT_CODE', 'GEOIP_COUNTRY_CONTINENT', 'GEOIP_DMA_CODE', 'GEOIP_METRO_CODE', 'GEOIP_LATITUDE', 'GEOIP_LONGITUDE', 'GEOIP_POSTAL_CODE', and 'GEOIP_CITY'.
COUNTRY_DB: 'GEOIP_COUNTRY_CODE', 'GEOIP_COUNTRY_NAME', 'GEOIP_CONTINENT_CODE', and 'GEOIP_COUNTRY_CONTINENT'.
ASN_DB: 'GEOIP_ORGANIZATION' and 'GEOIP_ISP'.

Example

COUNTRY_DB

Environment Variables

Description

Assign the results of database lookups to environment variables.

Syntax

Variable_Name mapped_DB_data

One entry per line. Path to data can use map keys or 0-based array indexes, both being separated by /.

Example

COUNTRY_CODE COUNTRY_DB/country/iso_code
REGION_CODE CITY_DB/subdivisions/0/iso_code

IP2Location DB File Path

Description

The location of a valid database file.

Syntax

Filename which can be an absolute path or a relative path to $SERVER_ROOT.

DB Cache Type

Description

The caching method used. The default value is Memory.

Syntax

Select from drop down list