Module Directives


Description Load Appweb module
Synopsis LoadModule moduleName modulePath
Context Default server
Example LoadModule openSsl /etc/appweb/modules/

The LoadModule directive causes the specified module to be loaded and its functionality made available to the default server and all virtual hosts. LoadModule directive will locate and dynamically load the module shared library and then activate it for processing.

The modulePath argument is the filename for the module without the extension. Appweb omits the extension so that loading modules will work regardless of the platform specific module filename extension. The modulePath may be an absolute path or it may be relative to the Server Root. If the modulePath if a pure filename without any directory portion, the directory paths specified by the LoadModulePath are used to search for the module.

The order of modules in the Appweb configuration file is important. If module "A" uses the services of module "B", then module "B" must be loaded prior to loading module "A".

Types of Modules

There are many kinds of modules:

  • Handlers
  • Filters
  • Connectors
  • Pure modules

Handlers are modules that respond to HTTP requests and serve the response content themselves. Pure modules are units of functionality that augment Appweb without directly handling HTTP responses themselves.

Appweb will automatically load the modules for built-in modules and handlers including: ESP, Ejscript, PHP, CGI and SSL if Appweb is built with support for those modules.

Appweb supplied modules

Common Gateway Interface Handler cgi mod_cgi
Embedded Server Pages Handler esp mod_esp
Ejscript Web Framework and Handler ejs mod_ejs
SSL Module ssl mod_ssl


Description Specify a list of directory paths to search when loading Modules
Synopsis LoadModule path ...
Context Default server
Example LoadModulePath "../bin:/home/josh/test:/My Modules"

The LoadModulePath directive causes subsequent LoadModule directives to search for their modules in the paths nominate by the LoadModulePath directive, if the module paths do not contain directory paths. On Unix like systems, the path separator is ":". On windows, the path separator is ";". Relative paths in this directive are resolved relative to the server root directory. The default path is:



Description Unload an Appweb module
Synopsis UnloadModule moduleName seconds
Context Default server
Example UnloadModule espHandler 60

The UnloadModule directive causes the specified module to be unloaded if it is inactive for the given number of seconds.

NOTE: PHP cannot be unloaded due to a common bug in the PHP shutdown routines.

© Embedthis Software, 2003-2015. All rights reserved.