Quick Nav
Alias
DocumentRoot
ExtraPath
Group
Listen
ListenIF
Protocol
Redirect
ScriptAlias
ServerName
ServerRoot
SessionAutoCreate
TraceMethod
TypesConfig
User
See Also
ConfigurationConfiguration Directives
Server Directives
Alias
| Description | Map URLs and leading URL portions to file system locations.
|
| Synopsis
|
Alias urlPortion destinationPath |
| Context | Default server, Virtual host
|
| Example
|
Alias /manual /ftp/manualDirectory
|
It is an easy mistake to have mismatched trailing slashes. If you have a trailing slash on the urlPortion ensure you also have one on the destinationPath. Appweb will warn you if you have mismatched trailing slashes.
DocumentRoot
| Description | Directory containing the documents to be published for the default server. |
| Synopsis
|
DocumentRoot directoryPath |
| Context | Default server, Virtual host
|
| Example
|
DocumentRoot /var/www |
ErrorDocument
| Description | Define an error document to be served when a HTTP error is encountered |
| Synopsis
|
ErrorDocument code URL |
| Context | Default server, Virtual host
|
| Example
|
ErrorDocument 404 /notFound.html
|
ExtraPath
| Description | Control extra path processing for a request |
| Synopsis
|
ExtraPath on|off |
| Context | Default server, Virtual host, Location
|
| Example
|
<Location /esp>
ExtraPath on </Location> |
In the example above, the URL
http://site/esp/myScript.esp/extra/path
would have the /extra/path stripped off and stored in PATH_INFO.
Group
| Description | Account group that Appweb will run as. |
| Synopsis | Group accountGroup |
| Context | Default server
|
| Example
|
Group nobody |
The Group directive specifies the account group in which Appweb will be a member
when running.
WARNING: It is extremely dangerous to run Appweb as Group "root" or "administrators".
It is important that you run Appweb with the lowest system privilege that will get the job done. If any
application is compromised, including Appweb, then the system will be safest if the compromised
application has as few privileges as possible.
When Appweb starts it initially runs as root or administrator and then changes to the user account
defined in the Appweb configuration file by the User directive. As installed, Appweb will be configured
to run using the nobody account on Linux and in the guest account on Windows.
HttpChunking
| Description | Control use of HTTP 1.1 chunked transfers |
| Synopsis
|
HttpChunking [on|off] |
| Context | Default server, Virtual host
|
| Example
|
HttpChunking off
|
The HttpChunking directive enables or disables the use of HTTP 1.1 chunked transfers. By default, chunking is enabled. Chunked transfers will normally be used only when the Appweb handler cannot determine the length of the output response.
Chunking may also be controled on a per-request basis by the use of a custom client header. Using the X-Appweb-Chunk-Transfer header will enable or disable chunked transfers for a single client request. For example:
GET /bigFile.esp HTTP/1.1
X-Appweb-Chunk-Transfer: off
This will disable the use of chunked transfers for this request. When Appweb cannot determine
the length of the output response to a request and chunking is disabled, Appweb will close the connection to signify
the end of the request. If chunking is enabled, the response will be broken into chunks and the connection may remain
open for subsequent requests.
Listen
| Description | IP address and port on which to listing for incoming requests. |
| Synopsis | Listen [IP address:]portNumber |
| Context | Default server, Virtual Host
|
| Examples
|
Listen 80
Listen 205.162.77.64:7777 |
The Listen directive specifies the IP endpoints on which Appweb will listen for
incoming HTTP requests. If you specify only the portNumber and omit the IP address, Appweb will listen
on all network interfaces including the loop-back adaptor. Multiple Listen directives may be given and
Appweb will listen on all the specified endpoints.
If you are using virtual hosts, you must still specify a Listen directive for the endpoint that the
virtual host will serve. It makes no difference where you specify a Listen directive. in the
configuration file. For compatibility with Apache, you should specify your listen directives outside
any VirtualHost blocks.
ListenIF
| Description | Network interface and port on which to listing for incoming requests. |
| Synopsis | ListenIF [Interface:]portNumber |
| Context | Default server, Virtual Host
|
| Examples
|
ListenIF eth0
|
If you are using virtual hosts, you must still specify a Listen directive for the endpoint that the virtual host will serve. It makes no difference where you specify a ListenIF directive in the configuration file. For compatibility with Apache, you should specify your listen directives outside any VirtualHost blocks.
Protocol
| Description | HTTP protocol version to use |
| Synopsis | Protocol [HTTP/1.0 | HTTP/1.1] |
| Context | Default server
|
| Example
|
Protocol HTTP/1.0 |
If the Protocol directive specifies HTTP/1.1 and a browser makes a request using HTTP/1.0 it will not be processed and the client will receive an error.
NOTE: this directive is proprietary to Appweb and is not an Apache directive.
Redirect
| Description | Redirect requests to a new target. |
| Synopsis | Redirect [status] oldUrl newUrl |
| Context | Default server, VirtualHost, Directory
|
| Example
|
Redirect temp /pressRelease.html /fixedPressRelease.html
Redirect permanent /acme.html http://www.coyote.com/acme.html Redirect 410 /membersOnly |
The new URL may be local to the system, in which case it will begin with a "/" character. Or it may be on another system, in which case it will begin with "http://". In both cases, the user will receive a HTTP redirection response informing them of the new location of the document.
The status argument may be either a numeric HTTP code or it may be one of the following symbolic codes:
- permanent -- Permanent redirection. HTTP code 301.
- temp -- Temporary redirection. HTTP code 302
- seeother -- Document has been replaced, see other document. HTTP code 303.
- gone -- The resource has been remove. HTTP code 410. The newURL argument is ignored.
ScriptAlias
| Description | Map a URL to a destination and enable CGI script processing for that location. |
| Synopsis | ScriptAlias urlPath destinationPath |
| Context | Default server, Virtual Host
|
| Example
|
ScriptAlias /cgi-bin/ /var/myHost/cgi-bin |
<Location /cgi-bin>
Alias /cgi-bin/ "/var/myHost/cgi-bin/"
SetHandler cgiHandler
</Location>
SECURITY WARNING: Make sure you locate your CGI script directories outside the DocumentRoot.
ServerName
| Description | Define the fully qualified hostname and port number for the server to use. |
| Synopsis | ServerName hostName |
| Context | Default server, Virtual Host
|
| Example
|
ServerName www.acme.com |
When used inside Name VirtualHost blocks, the ServerName directive specifies the name that must be specified in the "Host" HTTP header.
ServerRoot
| Description | Directory containing the core Appweb installation files |
| Synopsis | ServerRoot directoryPath |
| Context | Default server |
| Example
|
ServerRoot /etc/appweb |
SessionAutoCreate
| Description | Specifies if client session state stores should be automatically created. |
| Synopsis | SessionAutoCreate on|off |
| Context | Default server, Virtual Host |
| Example
|
SessionAutoCreate on |
If SessionAutoCreate is not enabled, sessions may still be used but each web page will need to activate session handling. For example: ESP pages should call useSessions at the top of the page.
TraceMethod
| Description | Control the Trace HTTP method |
| Synopsis | TraceMethod on|off |
| Context | Default server
|
| Example
|
TraceMethod on
|
TypesConfig
| Description | Specify the location of the Mime types file |
| Synopsis | TypesConfig directoryPath |
| Context | Default server
|
| Example
|
TypesConfig /etc/appweb/mime.types
|
The directory path may be an absolute path or it may be relative to the ServerRoot directory.
The MIME types file has lines of the format:
ApplicationType [extensions]...
Feel free to modify the default mime types file, but be careful to save it as it will be overwritten should you upgrade Appweb.
User
| Description | The user account that Appweb will run as. |
| Synopsis | User accountName |
| Context | Default server
|
| Example
|
User nobody |
The User directive can only be used if Appweb is started using a privileged account such as root. Normally Appweb is started using the account root or administrator and thereafter it changes to run with less privilege using the specified accountName.
The accountName chosen for the User directive should have minimal privilege and should not be able to read or modify any files outside the DocumentRoot or specified Alias directories.
SECURITY WARNING: do not run as root or administrator. Omitting the User directive can have the same effect as using a "User root" directive.