Quick Nav
ActionAddHandler
AddType
ResetHandlers
LoadModule
See Also
Loadable ModulesHandlers
Configuration
Configuration Directives
Module and Handler Directives
Action
| Description | Specify the CGI program to run to handle the document |
| Synopsis
|
Action mimeType programPath |
| Context | Default server, Virtual host |
| Example
|
Action application/x-appweb-python /usr/bin/python
|
The CGI handler may match URLs by extension or by prefix path, depending on how the appweb configuration file setup. When a match by extension occurs, the cgiHandler will first see if an Action directive has been specified for the corresponding mime type for the URLs extension. If one is defined, the specified program is run with the CGI script passed as the first argument. If no action directive is found, the script is examined to see if it contains a "#!/programPath" in the first line of the script. If it does, the specified program is run with the CGI script passed as the first argument. If the script is a binary executable or if the first line does not contain such a programPath, the CGI script will be directly executed.
The default extensions in the appweb configuration file are: cgi, cgi-nph, bat, cmd, pl, py, and php. For Linux, the default settings also include an Action directive for the php extension. The other default extensions do not have Action directives.
The mime type may be added via the AddType directive or you may edit the mime.types file to add the mime type. Mime type entries associate a mime type with a given URL extension. For example, the following mime entry specifies that any URL with a ".php" extension should will have the application/x-appweb-php mime type:
application/x-appweb-php php
AddHandler
| Description | Add the specified handler for processing for given file extensions |
| Synopsis
|
AddHandler handlerName extension [extension] ... |
| Context | Default server, Virtual host, Location |
| Example
|
AddHandler espHandler .esp .asp |
If the AddHandler directive is specified within a VirtualHost or Location block, it is only valid within that context. VirtualHosts and Location blocks inherit the handler settings defined by outer blocks. I.e. a VirtualHost will inherit all the handlers of the default server. If you wish to remove a handler mapping, use ResetHandlers and then re-add the required handlers.
NOTE: Unlike Apache, the extensions are case sensitive on systems that have case sensitive file systems and the dot must be part of the extension.
AddType
| Description | Add a MIME type specifiction |
| Synopsis
|
AddType mimeType extension
|
| Context | Default server, Virtual host |
| Example
|
application/x-appweb-perl pl
|
ResetHandlers
| Description | Reset the list of defined handlers. |
| Synopsis
|
ResetHandlers |
| Context | Virtual host, Location |
| Example
|
ResetHandlers |
NOTE: ResetHandlers is a proprietary Appweb directive and is not supported by Apache.
LoadModule
| Description | Load the static or dynamic Appweb module |
| Synopsis | LoadModule moduleName modulePath |
| Context | Default server
|
| Example
|
LoadModule openSsl /etc/appweb/modules/libopenSsl.so |
Modules may be dynamically loaded shared objects (DLLs) or they may be statically linked objects. If a module is statically linked into Appweb, the LoadModule directive will start the module and activate it for processing. If a module is not statically linked into Appweb and it has been made into a dynamically loadable module, then the LoadModule directive will locate and dynamically load the shared object or DLL, link it into Appweb and then activate it for processing.
The moduleName is encoded in the module itself and must be the name specified by the module provider. The modulePath is the filename for the module without the extension. Appweb omits the extension so that configuration files will be more cross-platform. 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 configuration file is important. If module "A" uses the services of module "B", then module "B" must be loaded prior to loading module "A".
Handlers and Modules
There are two kinds of loadable modules:-
Handlers
-
Pure modules
Appweb supplied modules
| Authorization Module
|
auth
|
libauthModule |
| Common Gateway Interface Handler | cgi
|
libcgiHandler |
| C API Module
|
capi
|
libcapiModule
|
| Debug Handler
|
debug
|
libdebugHandler
|
| Embedded Gateway Interface Handler | egi
|
libegiHandler |
| Embedded Server Pages Handler | esp
|
libespHandler |
| GoAhead WebServer API Compatibility Module
|
compat
|
libcompatModule
|
| Matrix SSL Module
|
matrixSsl
|
libmatrixSslModule
|
| Open SSL Module
|
openSsl
|
libopenSslModule
|
| Secure Sockets Layer Module
|
ssl
|
libsslModule
|
| Static Page Handler
|
static
|
libcopyHandler
|
NOTE: Appweb modules are not binary or source compatible with Apache modules.
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" |
The LoadModulePath directive causes subsequent LoadModule directives to search for their modules in the paths nominate by the LoadModulePath directive, if those paths are do not contain directory paths. Each path may be enclosed by quotes if the path contains spaces.