The server.xml File
294
Netscape Enterprise Server NSAPI Programmer’s Guide • April 2002 (Draft)
If no virtual server (VS) can be found that matches an IP address or
Host
header,
requests are processed using the default VS defined in the
CONNECTIONGROUP
. This
VS could be made to output a customized error message, or even handle the
request using a special document root.
Variables
Defining variables for use in the
obj.conf
file is not required, but it is sometimes
useful. The following code defines and uses a
docroot
variable:
<?xml version="1.0" encoding="UTF-8"?>
<!-- declare any variables to be used in the server.xml file in the
ATTLIST below -->
<!DOCTYPE SERVER SYSTEM "server.dtd" [
<!ATTLIST VARS
docroot CDATA #IMPLIED
...
>
]>
...
<VS id="example.com" connections="group2"
mime="mime1" aclids="acl1">
<VARS docroot="/nes60/docs/class2/example"
webapps_file="web-apps.xml" webapps_enable="on" />
<USERDB id="default" database="default" />
</VS>
...
This variable allows different document root directories to be assigned for different
virtual servers. The variable can then be used in the
obj.conf
file. For example:
NameTrans fn=document-root root="$docroot"
Using this
docroot
variable saves you from having to define document roots for
virtual server classes in the
obj.conf
files. It also allows you to define different
document roots for different virtual servers within the same virtual server class.
NOTE
Variable substitution is allowed only in an
obj.conf
file. It is not
allowed in any other Enterprise Server configuration files.
Any variable referenced in an
obj.conf
file must be defined in the
server.xml
file at the
SERVER
,
VSCLASS
, or
VS
level. Defining
variables with default values at the
SERVER
or
VSCLASS
level and
overriding them in the
VS
is recommended.
Summary of Contents for ENTERPRISE SERVER 6.1
Page 1: ...NSAPI Programmer s Guide Netscape Enterprise Server Version6 1 April 2002 Draft...
Page 290: ...Miscellaneous 290 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 318: ...cinfo 318 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 336: ...Buffered Streams 336 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 344: ...344 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 350: ...350 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...
Page 356: ...356 Netscape Enterprise Server NSAPI Programmer s Guide April 2002 Draft...