The Appweb configuration is defined by an Apache-style
configuration file. This configuration file is read when Appweb
starts up and it controls every aspect of Appweb's configuration
including what ports and addresses to listen to, what modules to
load, where to find the web pages and how to log
requests.
Compatibility with the Apache configuration file format and
directives has been a goal to minimize learning time and
switching costs. While the level of compatibility is high, there
are a few differences:
-
The Appweb configuration file is processed in a single-pass
-
Only a subset of Apache directives are supported
-
For enhanced security Appweb has a few extra security
directives
By processing directives on a single-pass, Appweb is more
efficient, but the order of directives does matter with
Appweb.
The configuration file is usually called appweb.conf and is
read once when appweb is started so changes to the configuration
file requires that appweb be restarted. An alternative
configuration file may be specified by using the -f command line
switch
appweb -f myConfigFile.conf
Syntax
Configuration directives are one per line and are
case-insensitive for the directive name. Lines beginning with a
"#" character are comments and are ignored.
Lines beginning with a "#" character are comments and are
ignored. If you run Appweb with the "-C" command line option, the
configuration file will be parsed and the resulting configuration
will be displayed to the standard output.
appweb -c -f myConfigFile.conf
Sample configuration file
#
# Appweb Configuration File
#
ServerRoot "."
ErrorLog error.log
ServerName http://localhost:7777
DocumentRoot "/var/web"
Listen 7777
AddHandler authHandler
AddHandler espHandler .esp .asp
<Location /ESP>
SetHandler espHandler
</Location>
In this example, "ServerRoot", "ErrorLog", "ServerName",
"DocumentRoot", "Listen", "AddHandler", "Location" and
"SetHandler" are all directives. Note that some directives such
as "Location" may group other directives into a block.
Configuration Blocks
The configuration file is comprised of several directive
groups or blocks:
-
Global directives
-
Directory directives
-
Location directives
-
VirtualHost directives
A directive is global if it is not enclosed in a block by an
outer directive. The "Directory", "Location" and "VirtualHost"
directives may group other directives. There may be multiple of
these grouping directives, i.e. multiple Location blocks are
permissible.
Directory and Location blocks may not nest inside one-another,
but may be declared within a VirtualHost directive. VirtualHost
directives may not nest.
Order of Processing
The configuration file is parsed in a single top-to-bottom
pass. Because certain directives depend on others, the order of
directives is important. For example, you must define the
ServerRoot before using the LoadModule directive. The
documentation for each directive lists the dependent
directives.
|