help
The JNOS '?' command provides a list of all the top-level JNOS
commands.
To obtain more help on a particular command, type 'help' and the
command name. Or type the command name followed by a question mark.
Example: help mbox displays the help file for the mbox command
mbox ? displays the subcommands for the mbox command
history [<N>] Default: 10
The history command displays the number and contents of previous
commands retained in a circular list, or sets the depth <N> of the
history list. These commands can be recalled by the UP-arrow and
DOWN-arrow keys. Press return to execute a recalled command, or
backspace to erase from the right side. No further editing is
currently supported. Setting the list size to 0 (zero) disables
this feature.
hop
The 'hop' commands are used to test the connectivity of the
network.
hop check [-n] <host>
Initiate a hop check session to the specified host. This uses a
series of UDP "probe" packets with increasing IP time-to-live
(TTL) fields to determine the sequence of gateways in the path to
the specified destination. This function is patterned after the
UNIX 'traceroute' facility. If the -n option is used, no DNS
lookups are done, so no names are listed for each hop.
ICMP message tracing should be turned off before this command is
executed (see the 'icmp trace' command).
hop maxttl [<hops>] Default: 30
Display or set the maximum TTL value to be used in hop check
sessions. This effectively bounds the radius of the search.
hop maxwait [<seconds>] Default: 5
Display or set the maximum interval that a hop check session will
wait for responses at each stage of the trace.
hop queries [<count>] Default: 3
Display or set the number of UDP probes that will be sent at each
stage of the trace.
hop trace [on | OFF] Default: off
Display or set the flag that controls the display of additional
information during a hop check session.
hostname [<name>]
Display or set the local host's name. By convention this should be
the same as the host's primary domain name. This string is used
only in the greeting messages of the various network servers; note
that it does NOT set the system's IP address.
hostname crv.kuyx.ampr.org.
If <hostname> is the same as an <interface> defined in an
'attach' command, this command will search for a CNAME domain
resource record which corresponds to the IP address of the
<interface>. This is commonly used for to set your hostname to
that of a dynamically assigned IP address dial-in line.
http <subcommand>
<subcommand> controls the operation of the JNOS HTTP server.
http absinclude [on | OFF]
Set or show the value of the flag that determines if the html
specification 'include file="path"' is acceptable. If absinclude
is off, the include command results in an error reported to the client.
If on, the file at "path" is inserted into the html document being
prepared for transmittal to the client.
http always [ON | off]
This displays or sets the always-send flag. If on, html files will
always be sent regardless of their modification time. If you use SSIs
in your html files, then the file modification time of the html file
is not indicative of the content change, and setting always to ON may
prove useful.
http dontlog [str1|str2|...|strn]
This displays or sets a list of strings which, if contained in a URL,
will prevent detailed logging of that access. This command is available
when HTTP_EXTLOG was #define'd when JNOS was compiled.
Example: http dontlog junkdir/|.gif|.jpg
http maxcli [<number>] Default: 10
Display or set the maximum number of http client connections allowed.
When this limit is reached, or if available memory drops below 'mem
threshold', new connections are immediately refused.
See also "http simult".
http multihomed [on | OFF]
Display or set the flag which allows the http server to report
the name associated with the interface used to access it. If off,
the system hostname is used.
http simult [<number>] Default: 5
Display or set the number of simultaneous active http client connections
allowed. When this limit is reached, new connections will immediately
block until an older client connection terminates. See also "http
maxcli".
http status
Display information about the http server(s).
http tdisc [<#secs>] Default: 180
Display or set the number of seconds of idle time allowed a client
before it is disconnected for inactivity.
Notes:
1) To start an http server, use the start command. The syntax is:
start http [port#] [drive] [rootdir]
The default http server port is 80, the default disk drive is C,
and the default rootdir is /wwwroot. This root directory MUST
contain a file called "root.htm". If a client specifies an explicit
path to a directory below this root, a reference to "welcome.htm" in
that directory is assumed. If welcome.htm does not exist, a directory
listing is prepared and sent. "welcome.nhd" can be used instead of
"welcome.htm", to cause the file contents to be sent without headers.
This feature can be utilized to do unusual things like automatic
redirection (probably not necessary anymore with today's intelligent
browsers). The JNOS default http root dir can be changed by defining
a new value for HttpDir in nos.cfg (and starting JNOS with -f nos.cfg).
UNIX note: the drive letter is required, but ignored! Also, the
correct filename ending is ".html", not ".htm".
Client URL: JNOS file fetched:
http://your.system.name/ <rootdir>/root.htm
http://your.system.name/dir <rootdir>/dir/welcome.htm (if exists)
otherwise, a listing of <rootdir>/dir
contents
http://your.system.name/X/file <rootdir>/X/file
2) Multiple http servers, each on a different port, may be started,
up to a limit of 5 (established at compile time by MAXPORTS). The
stardard port is 80, but a non-standard one can be given in a URL,
such as "http://n3yco.ampr.org:99/".
3) The JNOS /spool directory must contain a file called "access.www"
which controls HTTP access rights. Lines either specify a directory
path at and below which access is denied, or specify a
{path, realm, encoded_user:passwd} sequence to which access is
permitted only if the encoding matches that provided by the client.
This file MUST exist, even if empty, to allow any http accesses.
Note that access.www limits what can be specified on your system
by a URL from an http client. It does NOT limit access to included
files specified in local html files (but see 'http absinclude').
Example:
#type1: path-relative-to-wwwroot realm encoded-"user:password"
/pub/jnos/www/unzipped/secret SecretPlace Z3Vlc3Q6aGVsbG8=
#type2: directory at or below which access is denied:
/pub/jnos/private
To produce an encoding of a "userid:password" combination to be
used in access.www, use the base64.exe utility (produced by 'make
base64' in the JNOS source directory):
base64 userid:password > encoded.txt
Then edit the resulting file to yield a line for insertion into
access.www.
4) If JNOS http was compiled with HTTP_EXTLOG #define'd, then by default
the directory /wwwlogs will contain a record of accesses. This file,
created daily, will grow VERY large if your server is very busy! See
http://mvmpc9.ciw.uni-karlsruhe.de for information on Karl-Heinz
Weiss' cleanlog utility. The log directory can be changed by defining
a new value for HLogsDir in nos.cfg (and starting JNOS with -f nos.cfg).
5) Counters are maintained in /wwwstats, but this directory can be changed
by defining a new value for HttpStatsDir in nos.cfg (and yes, starting
JNOS with -f nos.cfg).
6) Server Side Include (SSI) support is patterned after those in the
NCSA httpd. An SSI has the form: <!--# cmdname tag="value" -->
echo var="s" displays the value associated with variable <s>:
DATE_LOCAL - Current localtime
DATE_GMT - Current time in GMT
HOSTNAME - Server's hostname
DOCUMENT_URI - Resource Identifier of the current doc.
DOCUMENT_NAME- File name of the current doc.
LAST_MODIFIED- Modified date/time of the current doc.
TOTAL_HITS - Total hits on this server.
REQ_FROM - From: header of requestor (if available)
REQ_REFERER - Referring URL (if given by browser)
REQ_AGENT - Client browser's name (if given)
echo dcount="filename" displays the named counter.
echo icount="filename" increment and displays the named counter.
echo scount="filename" increment the named counter.
include file="/absolute/path" inserts the referenced file or dir,
provided "http absinclude" is set on.
include virtual="path" inserts the referenced file or dir, where
"path" is relative to the http root dir.
"path" must end in '/' to be interpreted as
a directory.
exec cgi="name?arglist" executes the cgi "name" which must be compiled
into JNOS. Two CGIs are presently available:
counter.xbm (if CGI_XBM_COUNTER was #define'd) and
postlog (if CGI_POSTLOG was #define'd).
counter.xbm produces an X-bitmap display of the counter name
provided as the argument. The counter is maintained in
/wwwstats. Additional arguments are "inv" for inverting the
display colors, and "noinc" to not increment the counter before
it is displayed. Because this counter is returned as a bitmap
it should be referenced as an image so a browser will handle it
correctly: <IMG src="/counter.xbm?tcount.dat+noinc">
postlog demos the POST html command; see http.c for details.
Note that a URL may specify a CGI as if it were a filename
under the root directory.
Example: http://localhost/counter.xbm?cntrname.ext
7) More information on writing html documents can be found at:
http://www.visualogic.com/http_1.0/index.html