


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.





       Client URL:                     Jnos file fetched:


       http://your.system.name/        <rootdir>/root.htm


       http://your.system.name/dir     <rootdir>/dir/welcome.htm (if exists)


                                       otherwist, 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).








    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.








    5) Counters are maintained in /wwwstats, but this directory can be changed


       by defining a new value for HttpStatsDir in 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.





               postlog demos the POST html command; see http.c for details.





               Note that a URL may specify a CGI as it 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








