2 $Id: gfs-virtual.xml,v 1.1 2005-03-13 21:43:00 adam Exp $
3 Description of the virtual hosts mechanism in YAZ GFS
4 Included in both manual and man page for yaz-ztest
8 The Virtual hosts mechanism allows a YAZ frontend server to
9 support multiple backends. A backend is selected on the basis of
10 the TCP/IP binding (port+listening adddress) and/or the virtual host.
13 For the HTTP protocol, the virtual host is specified in the Host header.
14 For the Z39.50 protocol, the virtual host is specified as in the
15 Initialize Request in the OtherInfo, OID 1.2.840.10003.10.1000.81.1.
19 Not all Z39.50 clients allows the VHOST information to be set.
20 For those the selection of the backend must rely on the
21 TCP/IP information alone (port and address).
25 The YAZ frontend server uses XML to describe the backend
26 configurations. Command-line option <literal>-f</literal>
27 specifies filename of the XML configuration.
30 The configuration uses the root element <literal>yazgfs</literal>.
31 This element includes a list of <literal>listen</literal> elements,
32 followed by one or more <literal>server</literal> elements.
35 The <literal>listen</literal> describes listener (transport end point),
36 such as TCP/IP, Unix file socket or SSL server.
39 The <literal>server</literal> describes a server and includes sub
40 elements which servers as parameters for this server.
43 The XML below configures a server with 2 listeners and 3 backend
44 servers. The server listens on port 9900 and 9901 identified
45 with references "public9900" and "public9901".
51 <listen id="public9900">tcp:@:9900</listen>
52 <listen id="public9901">tcp:@:9901</listen>
55 <directory>/var/www/s1</directory>
56 <config>zebra1.cfg</config>
60 <directory>/var/www/s2</directory>
61 <config>zebra2.cfg</config>
63 <server listenref="public9901">
64 <directory>/var/www/s3</directory>
65 <config>zebra3.cfg</config>
66 <cql2rpn>../etc/pqf.properties</cql2rpn>
76 <!-- Keep this comment at the end of the file
81 sgml-minimize-attributes:nil
82 sgml-always-quote-attributes:t
85 sgml-parent-document: "yaz.xml"
86 sgml-local-catalogs: nil
87 sgml-namecase-general:t