Home > Users Guide > Configuration Directives > Module Directives

Quick Nav

See Also

Module Directives

LoadModule

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

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 supplied modules

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

LoadModulePath

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"
Notes

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:

appweb-executable-directory:/usr/lib/appweb/bin.

Module Directives

UnloadModule

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

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 LLC, 2003-2013. All rights reserved. Embedthis, Appweb, ESP, Ejscript and Embedthis GoAhead are trademarks of Embedthis Software LLC.