Skip to content

Configure LiteSpeed Web Server

Note

Most of the configuration documentation for LiteSpeed Web Server has not been migrated from our Wiki yet. Please visit the wiki if you don't find what you are looking for below.

Apache-Style Directives

These directives can be used within Apache configuration files, but they may be LiteSpeed-specific (i.e. not recognized by Apache), in which case they must be contained within <IfModule litespeed>/</IfModule> tags.

LogRotationSize

The LogRotationSize <size> directive controls how frequently the access log should be rotated. In other words, once the log reaches the specified size in bytes, the contents will be copied to a backup file and a new log will be started.

This directive may only be set at the server level, and it cannot be used in Apache virtual host configuration.

You can add K, M, or G to the size, to signify kilo-, mega-, and gigabytes respectively. Use a value of 0 to disable the log rotation.

Examples

Disable log rotation:

<IfModule litespeed>
LogRotationSize 0
</IfModule>
Rotate logs after they reach 10MB:
<IfModule litespeed>
LogRotationSize 10M
</IfModule>

UniqueId

The UniqueId on|off directive is used to create a unique identifier for requests, similar to the Apache mod_unique_id directive. UniqueID is disabled by default.

This directive may be set at the server level, the virtual-host level or in the document root's .htaccess file.

Example

Enable UniqueID:

<IfModule litespeed>
UniqueId on
</IfModule>


Last update: April 22, 2022