• Antelope Release 5.3 Mac OS X 10.6.8 2013-12-18

 

NAME

rtwebserver - Embedded web-server for Antelope real-time systems

SYNOPSIS

rtwebserver [-v] [-p pfname] [-P port] [-s sitename] [pfplainref value [pfplainref value] ... ]

DESCRIPTION

The rtwebserver application runs an embedded web-server inside an Antelope real-time system (usually managed by rtexec(1)). The rtwebserver.pf parameter-file describes all contents of the web-site. Each element of the served Uniform Resource Locator (URL) hierarchy is mapped by the rtwebserver.pf parameter-file to the content to deliver. That content may be an external file, a sub-section of the rtwebserver.pf parameter file, or the output of a python rpy script. The python rpy script format is documented in the man-page rtwebserver_rpy(3y). The rtwebserver command-line may contain additional key-value pairs after all option arguments are given. These key-value pairs are inserted into the rtwebserver.pf parameter-file before that parameter-file is interpreted. These keys may then be used as parameter-file plain references (see pf(5) for an explanation of plain references). Most commonly this may be used to specify additional orbservers on the rtwebserver command-line, with which the configured web resources may interact.

OPTIONS

FILES

The rtwebserver program serves static and dynamic web files from locations specified in the rtwebserver parameter file, as described below.

ENVIRONMENT

The rtwebserver program assumes the ANTELOPE environment variable is properly set.

PARAMETER FILE

Parameters

Sample parameter file


port        8008
trackingdb  rtsys/rtwebtrack

valid_ip_addresses &Tbl{
	127.0.0.1	255.255.255.255
	10.10.10.0	255.255.255.0
}

reject_ip_addresses &Tbl{
}

site &Arr{
   pythonpaths &Tbl{
   }
   siteconfig &Arr{
        databases &Arr{
              antelope_demo                /opt/antelope/data/db/demo/demo
        }
   }
   pages &Arr{
      index               pf:demoindex     text/html     index
      css &Arr{
         style.css        pf:stylesheet    text/css
      }
   }
   demoindex &Literal{
           <html>
           <head>
           <link rel="stylesheet" href="/css/style.css" type="text/css" media="screen" />
           </head>
           <body>
           <h1>It works!</h1>
           </body>
           </html>
   }
   stylesheet &Literal{

        h1 {
          color: #000 ;
          font-family: arial, helvetica, geneva, sans-serif ;
          font-size: 1.3em ;
          margin: 2px ;
          margin-top: 20px ;
          font-variant: small-caps ;
          letter-spacing: 1px ;
          text-align: center;
        }
   }
}

EXAMPLE

% rtwebserver -v

SEE ALSO

rtwebserver_rpy(3y), rtexec(1), pf(5), legit_ip(3), RtcacheResource(3y), rtcache(1)

BUGS AND CAVEATS

If a hierarchy describing a web-page itself contains both a resource named pages and a resource named siteconfig, the rtwebserver program will get very confused. The rtwebserver program must be restarted after changes to its parameter file. As always under Unix, access to privileged ports require root execution privileges. The pathnames for files listed in the parameter file are relative to the current working directory in which rtwebserver is running, which may not be the same as the directory in which the parameter-file resides. The revproxy capability currently works only with top-level pages.

AUTHOR

Kent Lindquist
Printer icon