Quick Nav
See Also
Using Loadable Modules
Embeddable web servers have several competing goals:
- Minimize memory footprint
- Minimize CPU consumption
- Maximize security
- Provide a strong and standard feature set
To meet all these goals in one server is difficult. Appweb uses loadable modules so that the core HTTP server may be compact, secure and fast while still having the ability to grow functionality as required.
Appweb Modules
Appweb uses loadable modules to componentize its functionality. The following modules are delivered with Appweb:
Name | Purpose |
mod_auth | Authorization handler |
mod_cgi | Common Gateway Interface (CGI) handler |
mod_chunk | Transfer Chunk Encoding filter |
mod_dir | Directory listing handler |
mod_file | Static file handler |
mod_egi | Embedded Gateway Interface (EGI) handler |
mod_ejs | Ejscript Server-Side JavaScript) module |
mod_php | PHP handler |
mod_range | Ranged requests filter |
mod_ssl | Secure Sockets Layer (SSL) module |
mod_upload | File upload handler |
Dynamic and Static Loading
An Appweb loadable module is a discrete unit of functionality that may be linked into Appweb to enhance the core HTTP server. Loadable Modules may be delivered in two forms:
- Dynamically loadable library / Shared Library
- Statically linkable libraries
The same programming interface applies to both forms and you can create a single image which can be both dynamically and statically loaded.
LoadModule Directive
The Appweb configuration file specifies which modules to load and in what order. As some modules may depend on the functionality provided by other modules -- order does matter.
The LoadModule directive will load a module and activate it for processing. If the module is already loaded (either statically or dynamically), the load directive will have no effect.
LoadModule myModule lib/libmyModule
On Windows, this directive will load libmyModule.dll. On Linux, it will load libmyModule.so. If the module is statically linked into Appweb, the LoadModule directive will not need to load it.
Appweb will look for the module in the directory specified relative to the directory defined by the ServerRoot. Appweb will search other directories if a LoadModulePath directive is specified. This will nominate a set of directories to search in order when attempting to locate the module.
LoadModulePath "../../bin:../../bin/Debug:../../bin/Release"
For information about how to create a loadable module, see Creating Appweb Modules.