Register Module

You are here:
< Back

 

This wiki covers the generic steps for registering an OpenLiteSpeed module. These steps should allow you to add any module you wish, though configuration of modules may vary.

For this guide, we assume you already have downloaded a copy of the module source code and have a working installation of OpenLiteSpeed 1.3 or higher. Module support is only available in versions 1.3 or higher.

In this guide we will be using the OpenLiteSpeed cache module as our example.

Make the Module

Source code for modules provided by LiteSpeed is located in the decompressed OpenLiteSpeed download package (not in your OpenLiteSpeed installation) under the src/modules directory.

Run make with the module source code:

This should create a dynamic library called MODULE_NAME.so.

Copy the dynamic library MODULE_NAME.so to the OpenLiteSpeed modules directory.

cp cache.so /usr/local/lsws/modules

Add the Module to OpenLiteSpeed

Go to WebAdmin Console > Server Configuration > Modules > Add:

Enter the name of the module as “MODULE_NAME” in this example its cache.

Copy in the parameters. Most modules are configured using parameters entered into the Parameters setting. These settings should be discussed in the module’s documentation.

Save the module settings.

Graceful Restart your server.

Make sure the module priority does not conflict with other modules. Conflicting module priorities can cause erratic functionality. Leaving priorities as “Not Set” should be safe for most use cases.

Further Configuration

Modules may be able to be further configured at the virtual host, context, and script handler levels. More specific levels of configuration will always override more general levels. For example, virtual host-level configurations override server-level configurations and context-level configurations override virtual host-level configurations.