Renamed ztest-options.xml to gfs-options.xml. Added GFS common synopsis
[yaz-moved-to-github.git] / doc / gfs-virtual.xml
1 <!-- 
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
5 -->
6
7 <para>
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.
11 </para>
12 <para>
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.
16 </para>
17 <note>
18  <para>
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).
22  </para>
23 </note>
24 <para>
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.
28 </para>
29 <para>
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.
33 </para>
34 <para>
35  The <literal>listen</literal> describes listener (transport end point),
36  such as TCP/IP, Unix file socket or SSL server.
37 </para>
38 <para>
39  The <literal>server</literal> describes a server and includes sub
40  elements which servers as parameters for this server.
41 </para>
42 <para>
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".
46
47  [More to be written]
48  <screen>
49   <![CDATA[
50 <yazgfs>
51   <listen id="public9900">tcp:@:9900</listen>
52   <listen id="public9901">tcp:@:9901</listen>
53   <server>
54     <host>host1</host>
55     <directory>/var/www/s1</directory>
56     <config>zebra1.cfg</config>
57   </server>
58   <server>
59     <host>host2</host>
60     <directory>/var/www/s2</directory>
61     <config>zebra2.cfg</config>
62   </server>
63   <server listenref="public9901">
64     <directory>/var/www/s3</directory>
65     <config>zebra3.cfg</config>
66     <cql2rpn>../etc/pqf.properties</cql2rpn>
67     <explain>
68       <my>explain</my>
69     </explain>
70   </server>
71  </yazgfs>
72 ]]>
73  </screen>
74 </para>
75
76 <!-- Keep this comment at the end of the file
77 Local variables:
78 mode: sgml
79 sgml-omittag:t
80 sgml-shorttag:t
81 sgml-minimize-attributes:nil
82 sgml-always-quote-attributes:t
83 sgml-indent-step:1
84 sgml-indent-data:t
85 sgml-parent-document: "yaz.xml"
86 sgml-local-catalogs: nil
87 sgml-namecase-general:t
88 End:
89 -->