Help:Modules:Registering

From OpenLiteSpeed
Jump to: navigation, search

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.

Contents

Find the module source code

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

Cache Mod Make.png

This should create a dynamic library called MODULE_NAME.so.

Cache.so.png

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

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

Add the module by going to WebAdmin console > Configuration > Server > Modules > Add

Cache Mod Add.png

Enter the name of the module as "MODULE_NAME"

Cache Mod Name.png

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.

Cache Mod Param.png

Save the module settings

Cache Mod Save.png

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 configure the module at different levels

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.