BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo Command Reference

tuxwsvr(1)

Name

tuxwsvr - Mini Web Server for use with BEA Tuxedo Web GUI

Synopsis

tuxwsvr  -l nlsaddr  [-d device]  [-L logfile] [-F] 
-i initialization_file

Description

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 on which 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 preforked 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.

-l nlsaddr

Network address at which the process listens for connections. TCP/IP addresses may be specified in the following forms.

"//hostname:port_number"
"//#.#.#.#:port_number"

In the first format, tuxwsvr 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 dotted decimal format (#.#.#.#) is used. 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 either 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.

-d device

Full path name of the network device. For Release 6.4 or higher, this parameter is optional. For prior releases, it should be used if required by the underlying network provider (for example, tcp).

-L logfile

Prefix of the name of the file used by tuxwsvr to log Web requests and error messages. The actual name of the logfile is formed by adding a seven-character string (.mmddyy-indicating the month, day, and year) to this prefix. If this option is not specified, the Web server log file prefix is WB in the current directory. The first log message written on each successive day that the tuxwsvr process runs is written to a new file.

-F

Specifies that tuxwsvr should run in the foreground rather than placing itself in the background. This option is mainly useful for testing and debugging. (The tuxwsvr process automatically runs in the background unless otherwise specified; the trailing ampersand (&) on the command line is not required.)

-i initialization_file

An initialization file must be specified on every tuxwsvr command line. The command-line option that lets you do so is -i. The following section describes the format of an initialization file.

Initialization File Format

An initialization file contains mappings to directories needed by the Web server and, possibly, some comment lines. (The latter are marked by # signs at the beginning of the line.) Each non-comment line consists of three fields separated by white space.

Initialization File Format

Field

Contents

1

Either HTML or CGI, indicating 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-comment line in the initialization file must have a prefix of `/'. If any line prior to the last non-comment line in the initialization file has a prefix of `/', a warning message is generated.

A Note about Changing the Initialization File

The initialization file is read once at startup time. Thus, if you make any changes to this file, you must stop and restart tuxwsvr before your changes will take effect.

Example of a UNIX System Initialization File

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/tuxedohttp://tuxmach.acme.com:8080/webgui/tuxadm?TUXDIR=/home/tuxedo

Your request has two effects:

Note that it is not a good idea to specify $TUXDIR/bin as a value for an initialization file CGI directory since doing so makes it possible for Web users to invoke any BEA Tuxedo executable. (Such users cannot, however, see the output from executables other than tuxadm since these other executables are not written as CGI programs.)

Also, note that in the previous example the first HTML line is redundant since the second HTML line maps subdirectories of /java to the same path. 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.

Example of a Windows NT Initialization File

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 is retrieved.

D:\\tuxedo\\htmldocs\\page1.html

Presumably this file is a customer-created page that invokes the Web GUI.

Termination

There is only one way to achieve a normal termination of a tuxwsvr process: by sending it a SIGTERM signal.

Recommended Use

In the current release of the BEA Tuxedo system 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 UNIX initialization scripts so that the Web server will be started automatically.

TUXDIR=tuxdir_path_name $TUXDIR/bin/tuxwsvr -l nlsaddr -i initialization_file

tuxdir_path_name represents the full path name of the location of the BEA Tuxedo system software for that application. 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 terminate automatically and gracefully log an appropriate message.

Network Addresses

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 usually yields 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 completing the following steps.

  1. Enter uname -n

    The system returns node_name.

  2. Enter grep node_name /etc/hosts

    The system returns 182.11.108.107 node_name.

  3. 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-tuxwsvr. The address specified by the -l option can be represented in any of several ways:

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 usually yields a unique name.

See Also

tuxadm(1), wlisten(1)