Description:
Verify permissions associated with the resource identified by
the current physical path.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
RequirePermissions | - | Combination of 'x', 'r', 'w' | Permissions required on file | RequirePermissions="x" |
Option | Meaning |
---|---|
r | Resource must be readable |
w | Resource must be writable |
x | Resource must be executable |
Phase:
CHECKACCESS
Returns:
PIAPI_ERROR if this handler was invoked for an inappropriate phase,
otherwise PIAPI_COMPLETED is returned. If the resource does not
have the required permissions this handler sets the response status
to 403 Forbidden.
Note:
Not all permission flags may be checked on all operating systems, where
a permission cannot be verified because the operating system does not
support the flag that permission will be considered passed.
An observation of this note is that a later phase may fail to
access a resource that passed this verification for the access attempted.
Example:
<Object> Name AccessByFile Class AccessByFileClass </Object> <Object> ... CheckAccess AccessByFile RequirePermissions="R" ... </Object>
:
Description:
Evaluate a Pi3Expression to cause a side effect.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
Pi3Expression | + | A Pi3Expression | Pi3Expression to evaulate | Pi3Expression="&dbreplace(response,string,ObjectMap,Scripts)" |
Phase:
Any
Returns:
PIAPI_ERROR if this handler was invoked for an inappropriate phase,
otherwise PIAPI_CONTINUE is returned.
Example:
<Object> Name Action Class ActionClass </Object> <Object> ... CheckType Action Pi3Expression="&dbreplace(response,rfc822,\ Content-Type,text/plain)" ... </Object>
:
Description:
Basic authentication is not included in this distribution.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
Realm | + | A string | Realm to authenticate | Realm="Admin" |
Base64 | + | A base64 encoded string | Encoding of username and password | Base64="a9Dedd034" |
Phase:
CHECKAUTH
Returns:
PIAPI_COMPLETED if authentication passed. INT_REDIRECT if the
status was set to 401 to challenge, PIAPI_CONTINUE if this
handler choose to take no action and PIAPI_ERROR if this handler
was invoked for a phase other than CHECKAUTH.
Note:
Example:
<Object> Name BasicAuth Class BasicAuthClass </Object> <Object> ... Handle BasicAuth ... </Object>
:
Description:
Perform simple proxy requests. This handler allows some filtering of
forward client headers, but no caching. Proxy requests use HTTP/1.0
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
IOObject | - | <A Pi3 Object> | Prototype IO object for proxy forwarding | IOObject "TCPIPClient" |
CacheRoot | - | <directory path> | Relative or Absolute path to cache root | CacheRoot "Cache" |
Phase:
HANDLE
Returns:
PIAPI_COMPLETED on success.
If this handler was invoked for a phase other than HANDLE then PIAPI_ERROR
is returned.
Note:
Example:
<Object> Name BasicProxy Class BasicProxyClass </Object> <Object> ... Handle BasicProxy ... </Object>
:
Description:
This HTTP Handler handles CGI requests.
This documentation is not completed. Please refer to source file and/or
example configuration files for typical usage.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
FileIOObject | + | <objectname> | A Pi3 IO object | FileIOObject "CGIFileIO" |
Variable | - | <Pi3Expression> | A variable definition | Variable "GATEWAY_INTERFACE=CGI/1.1" |
DataFile | - | <Pi3Expression> | Path to CGI data file | DataFile "./CGITemp/%u.ini" |
StdinFile | - | <Pi3Expression> | Path to CGI input file | StdinFile "./CGITemp/%u.in" |
StdoutFile | - | <Pi3Expression> | Path to CGI output file | StdoutFile "./CGITemp/%u.out" |
DataBlock | - | <Pi3Expression> | Block of text written to datafile | DataBlock "[CGI]\nRequest Protocol..." |
KillAfter | -1 | <A number> | Time to wait before killing the process. | KillAfter "-1" |
Flag | - | "16-Bit", etc. | A flag to effect CGI | Flag "16-Bit" |
This mechanism is typically used to support CGI variants other than standard CGI, namely WinCGI and DOSCGI.
Specification of 'DataFile', 'StdinFile' or 'StdoutFile' cause the standard CGI streams environment to be disabled.
This mechanism is typically used to support CGI variants other than standard CGI, namely WinCGI and DOSCGI.
Specification of 'DataFile', 'StdinFile' or 'StdoutFile' cause the standard CGI streams environment to be disabled.
This mechanism is typically used to support CGI variants other than standard CGI, namely WinCGI and DOSCGI.
Specification of 'DataFile', 'StdinFile' or 'StdoutFile' cause the standard CGI streams environment to be disabled.
This mechanism is typically used to support CGI variants other than standard CGI, namely WinCGI and DOSCGI.
Flags are:-
16-Bit Windows NT onlyExpect CGI programs to be 16-Bit
Windows or MS-DOS images, change semantics appropriately.
Example:
<Object> Name CGI Class CGIClass FileIOObject "CGIFileIO" Variable "GATEWAY_INTERFACE=CGI/1.1" </Object> <Object> Name CGI Class CGIClass FileIOObject "CGIFileIO" Variable "GATEWAY_INTERFACE=WinCGI/1.0" CGITempDir "CGITemp" DataFile "./CGITemp/%u.dat" StdinFile "./CGITemp/%u.in" StdoutFile "./CGITemp/%u.out" DataBlock "[CGI]\nRequest Protocol=HTTP/1.0\n" </Object>
:
Description:
Check if the resources identified by the physical path is a directory. If
the resource is a directory then set the Content-Type of the resource to
the type identified by the 'SetType' parameter.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
SetType | + | A MIME type/subtype pair | Internal directory MIME type | SetType="internal/x-directory" |
Phase:
CHECKTYPE
Returns:
PIAPI_COMPLETED if the resource was a directory and the Content-Type
was set to the type specified by the 'SetType' parameter.
Example:
<Object> Name CheckForDirectory Class CheckForDirectoryClass </Object> <Object> ... CheckType CheckForDirectory SetType="internal/x-directory" ... </Object>
:
Description:
Set the HTTP response status code to '304 Not Modified' if all the
following criteria are met:
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
Flag | - | RefreshOlderThanServer | Force refresh on server start | Flag="RefreshOlderThanServer" |
RefreshOlderThanServer forces the handler not to return 304 (not modified) status for a file modified before the server was last restarted (this handler was loaded).
Phase:
Any phase, usually CHECKPATH.
Returns:
PIAPI_COMPLETED if the status was set to '304 Not Modified', otherwise
PIAPI_CONTINUE.
Example:
<Object> Name ConditionalGet Class ConditionalGetClass </Object> <Object> ... CheckType ConditionalGet ... </Object>
:
Description:
Deletes temporary files from a response cycle. Temporary files
are listed in the "TemporaryFile", string variable of the response
DB.
If debugging is enabled this handler will not delete any files.
Phase:
DESTROY
Returns:
PIAPI_CONTINUE, or PIAPI_ERROR if invoked for a phase other than
DESTROY.
Note:
Example:
<Object> Name DeleteTemporaryFiles Class DeleteTemporaryFilesClass </Object> <Object> ... Destroy DeleteTemporaryFiles ... </Object>
:
Description:
Executes the following steps:
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
IndexFile | - | Filename | Index file name | IndexFile="index.html" |
Phase:
CHECKPATH
Returns:
PIAPI_COMPLETED if the phase completed succesfully. PIAPI_CONTINUE
if no action was taken, this will occur when the specified resource
is not a directory. PIAPI_ERROR and PIAPI_ABORT respectively when
generic and severe errors occur.
Example:
<Object> Name DirectoryExists Class DirectoryExistsClass </Object> <Object> ... CheckPath DirectoryExists IndexFile="index.html" \ IndexFile="default.html" ... </Object>
:
Description:
Generate directory indexes based on flexible criteria and send the
output directly to the remote client.
The directory listing sent to the user is composed of the following
document in order:
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
HeaderPattern | - | A Pi3Expression | Output first | HeaderPattern=" |
HeaderFile | - | A filename | File sent before listing | HeaderFile="HEADER" |
FooterFile | - | A filename | File send after listing | FooterFile="FOOTER" |
ListTop | - | A Pi3Expression | Output before file iteration | ListTop="Directory listing of %p" |
FilePattern | + | A Pi3Expression | Determines output generated for every file | FilePattern="&abbrev(%n,32,...)&align(%s,10,right)" |
ListBottom | - | A Pi3Expression | Output after file iteration | ListBottom=" " |
FooterPattern | - | A Pi3Expression | Output last | FooterPattern="" |
DescriptionFile | - | <filename> | File with descriptions of files | DescriptionFile=".desc" |
MIMEIcon | - | "MIME icon_relative_path" | Maps a MIME specification to an icons path | MIMEIcon="text/* /icons/text.gif"; MIMEIcon="* /icons/unknown.gif" |
Include | - | Regular expression | A file pattern to include | Include="*" |
Exclude | - | Regular expression | A file pattern to exclude | Exclude="." |
HTTPEquiv | - | <rfc822-variable>: <content> | An rfc822 response header to send | HTTPEquiv="Content-Type: text/plain" |
LastModifiedFormat | - | "%a %b %d %Y %T GMT" | Format for file last modified date | LastModifedFormat="%a %b %d %Y %T GMT" |
SwapFileName | - | "file1 file2" | Replace any file1 name with file2 | SwapFileName=".. Parent Directory" |
Options | - | Options flags as described below | Options which effect behaviour | Options "Name | AltName | Size etc." |
the following parameters specific to directory indexing:
Pi3Expression parameter | Evaluates to |
---|---|
%a | Alternate file name |
%b | Empty if file is not a directory |
%c | Media (MIME) type |
%d | Description of the file if available |
%l | File last modified date |
%n | File/directory name |
%i | Icon |
%p | Directory (virtual path) |
%r | Relative path |
%s | Size in decimal |
file is of the form:
filename|its descriptionWhitespace will not be stripped out of the filename or description. Typically this file would also be excluded from the directory list by naming it in an 'Exclude' directive. If present a files description can be accessed via parameter %d.
Option | Meaning |
---|---|
Name | Lookup the name of the file or directory and put it in parameter %n |
AltName | Lookup the alternate name of the file or directory and put it in parameter %a. |
Icon | Evaluate the appropriate icon file for the file based on its extension and MIME type and make it available through parameter %i |
Size | Record the filesize of the current file in parameter %s in full decimal. If the current file is a directory '-' is placed in %s. If more than one of 'Size', 'AbbrevSize' or 'FormatSize' are used the results are undefined. |
MIMEType | Record the MIME type of the current file in parameter %c. |
RelPath | Record the relative path (path component of URL) to the file in parameter %r. |
AbbrevSize | The filesize is abbreviated and placed in parameter %s. The abbreviated file size has the following form '<1K', '3M', '2K', etc. If more than one of 'Size', 'AbbrevSize' or 'FormatSize' are used the results are undefined. |
FormatSize | The filesize is formatted with the comma (',') character seperating thousands. The formatted size of place in parameter $s. If more than one of 'Size', 'AbbrevSize' or 'FormatSize' are used the results are undefined. |
Phase:
HANDLE
Returns:
PIAPI_COMPLETED if a directory index was succesfully sent to the client.
PIAPI_CONTINUE if this handler done nothing. PIAPI_ERROR and PIAPI_ABORT
on generic and severe error conditions.
Example:
<Object> Name DirectoryIndex Class DirectoryIndexClass Options "Name | Size | MIMEType" </Object> <Object> ... Handle DirectoryIndex ... </Object>
:
Description:
Writes a logfile with flexible data and format.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
File | + | <filepath> | Relative or Absolute path to log file | File="Logs/access.txt" |
Expression | + | <Pi3Expression> | Pi3Expression to write | Expression="$A $h - [$t] $r $s $b" |
OpenMode | w | w or a | File mode to open logfile with | OpenMode="a" |
Phase:
LOG
Returns:
PIAPI_ERROR if this handler was invoked for a phase other than
LOG. Otherwise PIAPI_CONTINUE;
Example:
<Object> Name ExpressionLogger Class ExpressionLoggerClass OpenMode "a" Expression "$A $h - [$t] $r $s $b" </Object> <Object> ... Log ExpressionLogger File="Logs/access.txt" ... </Object>-->
:
Description:
Dispatches requests to multiple handlers depending on the request
phase.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
Condition | - | A Pi3Expression | Makes handler conditional | Condition="&cmp(dblookup(response,string,ObjectMap),Scripts)" |
Handlers | - | An optional condition followed by a list of handler names | Handles invoked for all phases | Handlers "yes" "Errors Scripts Default" |
<phase> | - | A phase name followed by an optional condition and a handler | Define a handler for a phase | Destroy "¬($d)" DeleteTemporaryFiles |
Phase:
All
Returns:
PIAPI_COMPLETED if the request from processed, PIAPI_CONTINUE otherwise.
PIAPI_ERROR or PIAPI_ABORT if any sub-handler returned these error
codes.
Example:
<Object> Name FlexibleHandler Class FlexibleHandlerClass Condition "&cmp(dblookup(response,string,ObjectMap),Scripts)" Handlers Condition="<expr>" "Errors Scripts Default" Init ... Headers ... HostMap ... Mapping ... CheckPath ... CheckAccess ... CheckType ... Handle ... Handle Condition="<expr>" ... Handle ... Log Condition="<expr>" ... Destroy Condition="<expr>" ... </Object> <Object> ... Handle FlexibleHandler ... </Object>
:
Description:
Set the MIME Type of the resource identified by the current physical
path by using the function HTTPCore_getMIMETypeFromExtension().
This looks up the MIME type using the file extension component of the physical path in the list of MIME types loaded into the server.
Phase:
CHECKTYPE
Returns:
PIAPI_CONTINUE in all cases.
Example:
<Object> Name MIMETypeByExtension Class MIMETypeByExtensionClass </Object> <Object> ... CheckType MIMETypeByExtension ... </Object>
:
Description:
This handler sets an error document virtual path according to the
HTTP error status code.
Subsequent mapping handlers map this virtual path to a physical path.
If a virtual path is mapped a number of the original client RFC822
request headers are modified or removed, most notably, the Method
is set to 'GET' and any 'If-Modified-Since' headers are removed. This
avoids confusion where subsequent handlers interpret the error resource
in the context of meta information of the original resource.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
IgnoreStatus | - | 0, 200, etc. | HTTP response codes | IgnoreStatus="0 200" |
<nnn> | - | /errors/404.html, /msgs/403.shtml, etc. | Response specific virtual error paths | 404="/errors/404.html"; 403="/errors/403.shtml" |
DefaultMessage | + | /errors/Unknown.html, /msgs/unknown.shtml, etc. | Default error message virtual path | DefaultMessage="/errors/Unknown.html" |
Action | - | A Pi3Expression | Evaluated if the error code is mapped | Action="&dbreplace(response,sting,ObjectMap,...)" |
Phase:
MAPPING
Returns:
PIAPI_CONTINUE in all non-error cases, whether or not an error
virtual path was set.
PIAPI_ERROR and PIAPI_ABORT respectively for generic and severe
error conditions.
Example:
<Object> Name MapToErrorDocument Class MapToErrorDocumentClass IgnoreStatus "0 200" </Object> <Object> ... Handle MapToErrorDocument DefaultMessage="/errors/Unknown.html" 403="/errors/Forbidden.html" ... </Object>
:
Description:
Maps a virtual path to another virtual path or a physical path.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
From | + | <path> | Search path | From="/" |
To | + | <path> | Replace path | To="/home/WWWDocs/" |
CaseSensitive | Yes | Yes|No | Specifies case sensitivity of "From" matching | CaseSensitive="No" |
PathInfo | No | Yes|No | Specifies if path after "To" is PATH_INFO | PathInfo="Yes" |
Action | - | A Pi3 Expression | Expression to be evaluated if path is mapped | Action="&dbreplace(response,string,ObjectMap,Scripts)" |
Typically CGI mapping sets PATH_INFO whereas regular document mapping does not.
Phase:
MAPPING
Returns:
PIAPI_ERROR if this handler was invoked for an inappropriate phase,
otherwise, PIAPI_COMPLETED if a path was mapped and PIAPI_CONTINUE if
no path was mapped.
Note:
The 'From' pattern must begin and end with '/' character, otherwise an
initialization error will be raised. This is to ensure that path mapping
does not result in unintended files becoming visible.
Note that paths are mapped in the order listed in the configuration file, so a path mapping statement with From="/" would match before one with From="/icons/" is listed first. Path mapping should be list in reverse order of directory depth to ensure correct mapping (place mapper with From="/" AFTER the one with From="/icons/").
Example:
<Object> Name PathMapper Class PathMapperClass </Object> <Object> ... CheckAccess PathMapper From="/" To="/home/Pi3Web/WebRoot/" ... </Object>
:
Description:
Read the status line and client request headers for a new HTTP client
request.
On read a correct request this handler may disable connection keep open
for the request if it is enable and any of the following conditions are
met:
Phase:
HEADERS
Returns:
PIAPI_COMPLETED if the phase completed without serious error. An HTTP
error status response (such as '400 Bad Request') may have been set.
On error PIAPI_ERROR is returned. An example of an error would be
invoking this handler for a phase other that 'HEADERS'.
Example:
<Object> Name ReadRequestHeaders Class ReadRequestHeadersClass </Object> <Object> ... Headers ReadRequestHeaders ... </Object>
:
Description:
Set an HTTP error response code if the physical resource does not
match particular criteria.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
RefuseStatus | - | HTTP Response code | Response code to set on failure | RefuseStatus=404; RefuseStatus="403" |
AllowFileMask | - | Combination of 'E', 'F', 'L', 'D' | Logical OR of condition to check | AllowFileMask="EF"; AllowFileMask="EFD" |
Option flag | Meaning |
---|---|
E | Resource must exist |
F | Resource is a regular file |
D | Resource is a directory |
L | Resource is a symbolic link |
Phase:
CHECKPATH
Returns:
INT_REDIRECT (via HTTPUtil_doHTTPError()) to cause the HTTP error
specified by RefuseStatus to occur if the conditions specified by
AllowFileMask are not met. Otherwise PIAPI_CONTINUE is returned to
allow other path checking handlers to be invoked.
PIAPI_ERROR is returned if this handler is used to respond to a
phase other than 'CHECKPATH'.
Example:
<Object> Name RefuseFileByMask Class RefuseFileByMaskClass </Object> <Object> ... CheckPath RefuseFileByMask AllowFileMask="EF" RefuseStatus=404 ... </Object>
:
Description:
Returns the specified error code. This handler can be used to 'fake'
a response to a phase, or to otherwise cause the specified return
code to be given.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
ReturnCode | + | COMPLETED, CONTINUE, REDIRECT, ERROR, ABORT | Specify a handler return code | ReturnCode="COMPLETED" |
Phase:
Any
Returns:
The specified return code.
Note:
Example:
<Object> Name ReturnCode Class ReturnCodeClass </Object> <Object> ... CheckAuth ReturnCode ReturnCode="COMPLETED" ... </Object>
:
Description:
This handler object sends specific canned error message text for each
HTTP error status code.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
IgnoreStatus | - | 0, 200, etc. | HTTP response codes | IgnoreStatus="0 200" |
<nnn> | - | Fragments/404.html, msgs/403.html, etc. | Response specific error messages | 404="Fragments/404.html"; 403="msgs/403.html" |
DefaultMessage | + | Fragments/Unknown.html, mgs/unknown.html, etc. | Default error message | DefaultMessage="Framents/Unknown.html" |
Phase:
HANDLE
Returns:
PIAPI_COMPLETED on success.
PIAPI_CONTINUE if no action taken.
PIAPI_ERROR and PIAPI_ABORT respectively for generic and severe
error conditions.
Example:
<Object> Name SendErrorMessage Class SendErrorMessageClass IgnoreStatus "0 200" </Object> <Object> ... Handle SendErrorMessage DefaultMessage="Fragments\Unknown.html" 403="Fragments\Forbidden.html" ... </Object>
:
Description:
Send a file including headers to a remote client. If this is a 'HEAD'
request only the HTTP headers will be sent.
HeaderPattern
-
A Pi3Expression
Output first
HeaderPattern="
Phase:
HANDLE
Returns:
PIAPI_COMPLETED if the file was sent.
If this handler was invoked for a phase other than HANDLE then PIAPI_ERROR
is returned.
Note:
Example:
<Object> Name SendFile Class SendFileClass </Object> <Object> ... Handle SendFile ... </Object>
:
Description:
This handler object evalulates and sends a Pi3Expression to a the
client.
By default this handler will send the result in the context of a
single-bodied response to the client. This default can be overriden
so this handler sends one content-body of a mulipart response.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
Pi3Expression | + | A Pi3Expression | Pi3Expression to be sent | "Process [$P], Thread [$k]" |
InMultipartResponse | No | Yes, No | Multipart response indicator | InMultipartResponse=Yes |
BufferSize | -1 | A decimal number | Maximum message length | BufferSize=4096 |
HTTPEquiv | - | "<rfc822_variable>: <content>" | HTTP Entity header | "Content-Type: text/html" |
response in the following way:
The values 'Yes' or 'No' (not case sensitive) may be used.
Phase:
HANDLE
Returns:
PIAPI_COMPLETED on success if InMultiPartResponse is 'No'.
PIAPI_CONTINUE if no action taken or on success and InMultiPartResponse is
'Yes'.
PIAPI_ERROR and PIAPI_ABORT respectively for generic and severe
error conditions.
Example:
<Object> Name SendPi3Expression Class SendPi3ExpressionClass BufferSize 128 HTTPEquiv "Content-Type: text/plain" </Object> <Object> ... Handle SendPi3Expression \ Pi3Expression="Hello, your computer's hostname is $h." ... </Object>
:
Description:
Parse and send server-side includes.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
Exec | No | 'Yes' or 'No' | Specific whether CGI scripts may be executed | Exec="Yes" |
HeaderPattern | - | A Pi3Expression | Output first before the page | HeaderPattern=" |
FooterPattern | - | A Pi3Expression | Output last | FooterPattern="" |
ExecFileFixup | - | A Pi3Expression | Evaluated to fixup CGI markers | ExecFileFixup="&dbreplace(response,string,ObjectMap,Scripts)" |
Note:
Phase:
HANDLE
Returns:
PIAPI_COMPLETED if the file was sent.
If this handler was invoked for a phase other than HANDLE then PIAPI_ERROR
is returned.
Example:
<Object> Name SendSSI Class SendSSIClass </Object> <Object> ... Handle SendSSI Exec="Yes" ... </Object>
:
Description:
Cause the given status code to be set for this handler.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
StatusCode | + | An HTTP response code in 3 digital decimal form | Specify an HTTP reponse code to be set | StatusCode="403" |
Phase:
Any
Returns:
PIAPI_COMPLETED.
Note:
Example:
<Object> Name StatusCode Class StatusCodeClass </Object> <Object> ... CheckAccess StatusCode StatusCode="403" ... </Object>
:
Description:
A virtual host object is a placeholder for variable-value attribute
pairs associated with virtual hosts.
This object creates its own PIDB and stores parameters in it for
reference. A pointer to this PIDB is access by other parts of the
HTTP server via the GetHostDB() method of the PIHTTP object.
Options:
Ad hoc options. All parameters are stored in this object PIDB with
type PIDBTYPE_RFC822.
Phase:
No phase. It is an error to invoke this object as part of phase handling.
Returns:
PIAPI_ERROR always, because this is not a handler.
Example:
<Object> Name VirtualHost Class VirtualHostClass HostName "host1" Administrator "jroy@johnroy.com" </Object>
:
Description:
Some operating systems allow multiple IP address to be used by the
same computer. On such systems it is possible to have multiple HTTP
servers simulated by the same server by customizing the servers behaviour
depending on the local IP address to which the client is bound.
This handler allows the requests virtual host object to be changed
depending on the local IP address of the request.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
VirtualHostObject | + | <objectname> | VirtualHost object to associate | VirtualHostObject="vhost1" |
BindAddress | + | IP address of form www.xxx.yyy.zzz | Server bound IP address | BindAddress="172.23.23.37" |
BindAddressVariable | "LocalAddr" | Variable name | IO object variable name | BindAddressVariable="LocalAddr" |
Phase:
HOSTMAP
Example:
<Object> Name VirtualHostByAddress Class VirtualHostByAddressClass BindAddressVariable "LocalAddr" </Object> <Object> ... VirtualHost VirtualHostByAddress VirtualHost="host1.foo.dom" \ BindAddress=120.0.0.1 ... </Object>
:
Description:
This handler allows the virtual host to be changed by filtering the
'Host' rfc822 header field sent by the browser.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
VirtualHostObject | + | <objectname> | VirtualHost object to associate | VirtualHostObject="vhost1" |
HostName | + | A hostname | Hostname of virtual host. | Hostname="foo.name.dom" |
Phase:
HOSTMAP
Example:
<Object> Name VirtualHostByName Class VirtualHostByNameClass BindAddressVariable "LocalAddr" </Object> <Object> ... VirtualHost VirtualHostByName VirtualHost="host1.foo.dom" \ HostName="host1.foo.dom" ... </Object>
:
Description:
This handler allows the virtual host to be changed by remaping the
the begining of the URL path from the client.
Options:
Option | Default | Values | Short Description | Example(s) |
---|---|---|---|---|
VirtualHostObject | + | <objectname> | VirtualHost object to associate | VirtualHostObject="vhost1" |
URLPath | + | A URL Path fragment | The URL path to use | URLPath="/vhost1/" |
Phase:
HOSTMAP
Example:
<Object> Name VirtualHostByURL Class VirtualHostByURLClass BindAddressVariable "LocalAddr" </Object> <Object> ... VirtualHost VirtualHostByURL VirtualHost="host1.foo.dom" \ URLPath="/host1/" ... </Object>