II.d.2 Running from the MULTINET_SERVER --------------------------------------- (Foteos Macrides, Worcester Foundation for Experimental Biology, ) Define a system logical GOPHER_CONFIG, or GOPHER_CONFIG# where # is the port number (for a multiple server environment), to point to the server's configuration file. For example: $ DEFINE/SYSTEM/EXEC/TRAN=CONCEAL/NAME=NO_ALIAS/NOLOG - GOPHER_CONFIG70 GOPHER_ROOT:[000000]_GOPHER70 In the configuration file (or each configuration file for a server to be started by the MULTINET_SERVER), add or modify the following items. Inetd: TRUE DataDirectory: GOPHER_ROOT:[000000] ScratchDir: GOPHER_ROOT:[_SCRATCH] SpawnInit: GOPHER$ROOT:[v1216]:GOPHER_SPAWN_INIT.COM Where GOPHER_ROOT:[000000] is the root of the data directory for the server; note that this *could* be different for each server, but need not be. GOPHER_ROOT:[_SCRATCH] is a directory which is fully accessible to the authorization under which the server using this configuration file will run (RWED). The directory will receive temporary and scratch files for the server and any subprocesses it spawns. Note that a server started by the MULTINET_SERVER will not have the system logical SYS$SCRATCH: defined, so a different value with an explicit device and directory path will be required. GOPHER$ROOT:[v1216]GOPHER_SPAWN_INIT.COM is a file in a directory to which the authorization running the server has read and execute access. Whenever a server started by the MULTINET_SERVER spawns a subprocess, the sub- process will execute the file to define symbols and so forth. Note the use of GOPHER$ROOT:[v1216] is specific to the site psulias.psu.edu; in no way should you feel obligated to use the same device and directory tree specification. Customize, as needed, the GOPHER_SPAWN_INIT.COM file. It should at minimum contain the following lines to insure appropriate operation of GREP searches (customize where your copy of EGREP resides, of course). Since servers started by MULTINET_SERVER go through OpenVMS LOGIN but do *NOT* perform the normal SYLOGIN.COM functions, this command file replaces the minimum features required there. Note also that it is not sufficient to define SYS$SCRATCH in this file; the server requires scratch space prior to any spawned tasks, so the scratch directory must be defined in the configuration file. $ V = F$VERIFY(0) $ ON ERROR THEN CONTINUE $ EGREP :== $x:EGREP $ EXIT Login to the SYSTEM account and add the Gopher Server as a service. Note the use of GOPHER$ROOT:[v1216] is specific to the site psulias.psu.edu; in no way should you feel obligated to use the same device and directory tree specification. $ multinet configure/servers SERVER-CONFIG>add gopherd70 Protocol: [TCP] TCP TCP Port number: 70 Program to run: GOPHER$ROOT:[v1216]GOPHERD.EXE SERVER-CONFIG>SAVE SERVER-CONFIG>RESTART SERVER-CONFIG>EXIT When a client attempts to connect to the configured port, MULTINET_SERVER should start a fresh copy of the server to service that client's request. Regardless of how long that copy of the server takes to process the request (and if the server survives the request ;-), other clients will not be obstructed. Note that servers started by the MULTINET_SERVER run under the SYSTEM auth- orization, and tend to be high-privileged users. The server discards all the dangerous privileges it can after binding to the connected socket. .