tuxwsvr - mini Web Server for use with BEA TUXEDO Web GUI
tuxwsvr -l nlsaddr [ -d device ] [-L logfile] [-F] -i initialization_file
tuxwsvr is a World Wide Web server process that can be used to support the BEA TUXEDO Web GUI by customers who do not have a commercial Web server or a public-domain Web server on the machine where the BEA TUXEDO Web GUI processes are running. tuxwsvr places itself in the background when invoked unless otherwise specified, and continues running until the machine shuts down or the tuxwsvr process is killed using an operating system command.
tuxwsvr contains all functionality necessary to support the BEA TUXEDO Web GUI, but does not include many features present in commercial Web servers, such as pre-forked processes, server-side HTML includes (.shtml files), default directory indexes, and https connections. (Note, however, that the BEA TUXEDO Web GUI can be run in secure mode without an https connection since it implements its own encryption protocol.) For performance reasons, the generic Web server does not perform reverse DNS lookups for received requests.
The following command-line options are used by tuxwsvr:
//\f2hostname:port_number //#.#.#.#:port_number
In the first format, tlisten finds an address for hostname using the local name resolution facilities (usually DNS). hostname must be the local machine, and the local name resolution facilities must unambiguously resolve hostname to the address of the local machine.
In the second example, the #.#.#.# is in dotted decimal format. In dotted decimal format, each # should be a number from 0 to 255. This dotted decimal number represents the IP address of the local machine.
In both of the above formats, port_number is the TCP port number at which the tlisten process will listen for incoming requests. port_number can either be a number between 0 and 65535 or a name. If port_number is a name, then it must be found in the network services database on your local machine.
The address can also be specified in hexadecimal format when preceded by the characters "0x". Each character after the initial "0x" is a number between 0 and 9 or a letter between A and F (case insensitive). The hexadecimal format is useful for arbitrary binary network addresses such as IPX/SPX or TCP/IP.
The address can also be specified as an arbitrary string. For example, string addresses are used in STARLAN networks.
An initialization file contains mappings to directories needed by the Web server and, possibly, some commentary lines. (The latter are marked by # signs at the beginning of the line.) Each non-commentary line consists of three fields separated by white space.
Field Contents 1 Either "HTML" or "CGI", indcating the type of files (HTML files or executable CGI programs) residing in the directory described in this line. 2 A path prefix. (If a particular request matches more than one prefix, the first matching prefix mapping in the file is chosen.) 3 The directory or file to which the path prefix (in Field 2) is mapped.
The last non-commentary line in the initialization file must have a prefix of `/'. If any line prior to the last non-commentary line in the initialization file has a prefix of `/', a warning message is generated.
The initialization file is read once at startup time. Thus, if you make any changes to this file, you must stop and restart the generic Web server before your changes will take effect.
The following is an example of an initialization file for a UNIX system.
CGI /cgi-bin /home/tuxedo/udataobj/webgui/cgi-bin CGI /webgui /home/tuxedo/udataobj/webgui/cgi-bin HTML /java /home/tuxedo/udataobj/webgui/java HTML /doc /home/tuxedo/doc HTML / /home/tuxedo/udataobj/webgui
Suppose the Web server is running on port 8080 on the following machine:
tuxmach.acme.com
Enter a request to either of the following URLs:
http://tuxmach.acme.com:8080/cgi-bin/tuxadm?TUXDIR=/home/tuxedo http://tuxmach.acme.com:8080/webgui/tuxadm?TUXDIR=/home/tuxedo
Your request will have two effects:
(a) It will invoke the program
/home/tuxedo/udataobj/webgui/tuxadm
(b) It will set the environment variable QUERY_STRING
to TUXDIR=/home/tuxedo in the program,
as stated in the World Wide Web CGI specification.
Note that it is not a good idea to specify $TUXDIR/bin as a value for the initialization file since doing so makes it possible for Web users to invoke any BEA TUXEDO executable. (Such users, however, would not be able to see the output of executables other than tuxadm, since these other executables are not written as CGI programs.)
Also, note that in the example above the first HTML line is redundant since the second HTML line would map subdirectories of /java to the same filepath. Nevertheless, we have included this line since some users might wish to place their java class files in a location other than the one in which they have stored their HTML documents.
The following is an example of an initialization file for a Windows NT system:
HTML /tuxedo/webgui D:\tuxedo\htmldocs CGI /cgi-bin C:\cgi-bin HTML /java D:\tuxedo\udataobj\webgui\java HTML / D:\tuxedo\udataobj\webgui
Suppose the Web server is running on port 80 on machine ntsvr1. Enter the following URL:
http://ntsvr1/tuxedo/webgui/page1.html
The following file will be retrieved:
D:\tuxedo\htmldocs\page1.html
Presumably this file is a customer-created page that will invoke the Web GUI.
There is only way to achieve a normal termination of a tuxwsvr process: by sending it a SIGTERM signal.
In the current release of BEA TUXEDO System/T the tuxwsvr process is provided as a Web server for the BEA TUXEDO administrative GUI for those customers who do not have a commercial Web server. On UNIX systems, we recommend adding a command line of the following format to initialization scripts so that the Web server will be started automatically:
TUXDIR=tuxdir_pathname $TUXDIR/bin/tuxwsvr \
-d /dev/devname -l nlsaddr -i initialization_file
tuxdir_pathname represents the full pathname of the System/T software for that application. devname represents the appropriate device name. The device used must support the particular network interface specified when the software was generated, for example, TLI. nlsaddr is the network-dependent address to be used by this tuxwsvr process.
One alternative method for starting the tuxwsvr process is to start it manually using the command line recommended above. A second alternative is to use cron jobs to start the tuxwsvr process periodically (daily, or perhaps even more often). Duplicate tuxwsvr command invocations using the same network address will terminate automatically and gracefully log an appropriate message.
The only restriction on the network address specified for the tuxwsvr process by the application administrator is that it be a unique address on the specified network. For a STARLAN network, a recommended address of uname.tuxwsvr will usually yield a unique name. For TCP/IP, the address is formed from a unique port selected by the application administrator paired with the node identifier for the local machine, that is, 0x0002ppppnnnnnnnn. Unique port values for a particular machine (pppp) need to be negotiated among users of that network/machine combination; higher port numbers tend to be better since lower numbers are frequently used for system related services. The appropriate value for the node field (nnnnnnnn) can be found in the /etc/hosts file by using the following steps:
Step 1: Enter uname -n Returns node_name Step 2: Enter grep node_name /etc/hosts Returns 182.11.108.107 node_name
You must convert the dot notation into eight hexadecimal digits.
Examples of Network Addresses Suppose the local machine on which the tuxwsvr is being run is using TCP/IP addressing. The machine is named "backus.company.com" and its address is 155.2.193.18. Further suppose that the port number at which the tuxwsvr should accept requests is 2334. Assume that port number 2334 has been added to the network services database under the name bankapp-nlsaddr. The address specified by the -l option could be represented in any of several ways:
//155.2.193.18:bankapp-nlsaddr //155.2.193.18:2334 //backus.company.com:bankapp-nlsaddr //backus.company.com:2334 0x0002091EB02C112
The last line shows how to represent the address in hexadecimal format: 0002 is the first part of a TCP/IP address, 091E is a hexadecimal translation of the port number 2334, and 9B02C112 is the hexadecimal translation of the IP address, 155.2.193.18. (In the latter translation, 155 becomes 9B, 2 becomes 02, and so on.)
For a STARLAN network, a recommended address of uname.tuxwsvr will usually yield a unique name.