Back to Contents | GAS Configuration File Overview


Interface to Connector - Configuration Reference

The INTERFACE_TO_CONNECTOR element in the Genero Application Server (GAS) configuration file specifies the interface to the GAS Connector; in other words the connection between the GAS and the GAS Connector (located with the Web Server).

The GAS Connector is either:

Syntax:

<INTERFACE_TO_CONNECTOR>
  <TCP_BASE_PORT> base </TCP_BASE_PORT>
  <TCP_PORT_OFFSET> offset </TCP_PORT_OFFSET>
  <LIMIT_REQUEST_SIZE>  </LIMIT_REQUEST_SIZE>
  <DOCUMENT_ROOT> root </DOCUMENT_ROOT>
  <TEMPORARY_DIRECTORY> dir </TEMPORARY_DIRECTORY>
  [ <ERROR_DOCUMENT Code="code"> path </ERROR_DOCUMENT> ]
  [ <ALIAS Id="aliasId"> path </ALIAS> ] [...]
</INTERFACE_TO_CONNECTOR>

Notes:

The INTERFACE_TO_CONNECTOR element may contain the following child elements (described below):

  1. One TCP_BASE_PORT element (required).
  2. One TCP_PORT_OFFSET element (required).
  3. One LIMIT_REQUEST_SIZE element (required).
  4. One DOCUMENT_ROOT element (required).
  5. One TEMPORARY_DIRECTORY (required).
  6. One ERROR_DOCUMENT element (optional).
  7. Zero or more ALIAS elements (optional).

Example:

<INTERFACE_TO_CONNECTOR>
  <TCP_BASE_PORT>6300</TCP_BASE_PORT>
  <TCP_PORT_OFFSET>94</TCP_PORT_OFFSET>
  <LIMIT_REQUEST_SIZE>0</LIMIT_REQUEST_SIZE>
  <DOCUMENT_ROOT>$(res.path.docroot)</DOCUMENT_ROOT>
  <TEMPORARY_DIRECTORY>$(res.path.tmp)</TEMPORARY_DIRECTORY>
  <ALIAS Id="/pic">$(res.path.pic)</ALIAS>
  <ALIAS Id="/fjs/pics">$(res.path.web.pics)</ALIAS>
  <ALIAS Id="/fjs/set1/img">$(res.path.tpl.ajax)/img</ALIAS>
</INTERFACE_TO_CONNECTOR>

In this example, the application server is listening on port 6394 (TCP_BASE_PORT + TCP_PORT_OFFSET), the application server web site root is specified as the resource $(res.path.docroot), and two virtual aliases - /pic and /tutorial.

To have several instances of the Genero Application Server (gasd) concurrently running on the same host, you create several application server configuration files (new versions of the as.xcf file) with different offsets; each application server would then listen at the offset specified.

If you modify the listening port, you must also modify the port information in the GAS Connector configuration file (connector.xcf), which is responsible for forwarding the application request to the application server.

Warning! If you create multiple application configuration files (one for each instance of the application server you wish to have running), you must take care to ensure that the port values are unique for each application server started. If two application server configuration files both specify the same TCP_BASE_PORT and TCP_BASE_OFFSET, a port conflict will occur.

Back to the top


TCP_BASE_PORT

The TCP_BASE_PORT element specifies the base value of the port the Genero Application Server is listening to; the true port that the Genero Application Server is listening to, however, is the port specified by TCP_BASE_PORT + TCP_PORT_OFFSET.

Usage Example:

  <TCP_BASE_PORT>6420</TCP_BASE_PORT>

Back to the top


TCP_PORT_OFFSET

The TCP_PORT_OFFSET element specifies the offset value of the port the GWC is listening to; the true port that the Genero Application Server is listening to, however, is the port specified by TCP_BASE_PORT + TCP_PORT_OFFSET.

Usage Example:

  <TCP_PORT_OFFSET>75</TCP_PORT_OFFSET>

Back to the top


LIMIT_REQUEST_SIZE

The LIMIT_REQUEST_SIZE element specifies the number of bytes that are allowed in a request. If the number is set to zero this means the size of the request is not limited.

Usage Example:

  <LIMIT_REQUEST_SIZE>0</LIMIT_REQUEST_SIZE>

0 means unlimited. The request can have any size,

Back to the top


DOCUMENT_ROOT

The DOCUMENT_ROOT element specifies the document root directory - the root of documents when the Genero Application Server is used as a Web server (for searching CSS, JavaScript, and other files). The default directory is $FGLASDIR/web.

When a Web server is included in the solution architecture, this directory is not relevant, and the Web server document root directory is referenced. This directory is often called htdocs for the Apache Web server or C:\Inetpub\wwwroot for IIS.

Usage Example:

  <DOCUMENT_ROOT>/usr/fgl2c/as/web</DOCUMENT_ROOT>

In this usage example, if you have the demos.html file in this directory and wish to access the file, use the URL:
  http://app_server:port/demos.html (where the file is on the host where the GAS resides)
or
  http://web_server/cgi-bin/fglccgi/demos.html (where the file is on the Web server host)

Back to the top


TEMPORARY_DIRECTORY

The TEMPORARY_DIRECTORY element specifies where to store the transferred files.

Usage Example:

  <TEMPORARY_DIRECTORY>/var/tmp</TEMPORARY_DIRECTORY>

In this example, the transferred files are stored in /var/tmp.

Back to the top


ERROR_DOCUMENT

The ERROR_DOCUMENT element contains the action to do in case of error. It takes an attribute Code, which specifies the HTTP status code. The element contains the action to perform in case of error. It can specify this action in one of three ways:

Usage Example:

  <ERROR_DOCUMENT Code="404">/demos.html</ERROR_DOCUMENT>

Back to the top


ALIAS

The ALIAS element specifies a virtual directory used to fetch documents in other directories. It takes an attribute Id, providing the alias name used elsewhere to reference the virtual directory. Within the element, you specify the true path or physical directory for which the alias is being created. You must specify an ALIAS element for each virtual directory you wish to create; the Id value for an ALIAS element must be unique amongst all ALIAS elements defined in the configuration file.

For more information on using aliases, refer to Using Aliases.

Usage Example:

  <ALIAS Id="/pic">/usr/fgl2c/as/pic</ALIAS>

In this usage example, to access the image accept.png located in /user/fgl2c/as/pic, use the URL:
  http://app_server:port/pic/accept.png  (where the file is on the host where the GAS resides)
or
  http://web_server/cgi-bin/fglccgi/pic/accept.png
(where the file is on the Web server host)

Back to the top