{INCLUDE _LOGOS_C.HTM}

PicLan-IP Web Server Configuration

The PicLan-IP Web Server is configured using a text item similar in format to the PicLan-IP TCP/IP stack configuration.

In pervious releases of PicLan-IP, configuration entries were scattered among multiple configuration items.  With PicLan-IP build 2.0.0(106), all of the configuration items have been consolidated into PLIP.CTRL CONFIG. Any reference to other configuration items are obsolete.

The PicLan-IP Web Server Configuration Files

The web server configuration is located in PLIP.CTRL CONFIG. This is a sample PicLan-IP Web Server configuration item:
HTTP DIR=*:80 / FILE WWW.ROOT (S

Web Server Virtual Directories

A web server is organized into "virtual directories". This structure allows you to store web documents in logical groupings. The example above demonstrates the simplest structure. With this configuration the web server will listen on the default IP port (the first port listed in the TCP/IP stack configuration file) on TCP port number 80 (the default for HTTP). The content is stored in a MV file named WWW.ROOT. The (S option indicates that the file can contain both plain items as well as items that include what looks like a directory path (ie, both INDEX.HTM and IMAGES/MSC_COL2.GIF).

Web Server MV File Structure

Beginning with this build 2.0.0(106), the PicLan-IP web server no longer requires individual multiple data portion files to help store web content. These files have been replaced with global cache files stored under the WWW.CTRL dictionary. Other than insuring that these files are correctly sized, you no longer need to create any special files for storing web content.

The PicLan-IP Web Server can use either standard MV data files or files in a non-MV file system accessed over:

You can choose to store your entire web content within a single MV file, or you can subdivide the content amongst multiple files and/or network directory specifications. How you manage this depends on your needs and habits.

Web Server Control Files

The PicLan-IP Web Server uses several control files to store pre-computed values for web pages. The item-ids used for these content files consist of the complete URL for the page (less the http://) as in:
207.215.231.99:80/INDEX.HTM
These control files are sub-files under the WWW.CTRL dictionary and have the names:
WWW.CTRL,PGCACHE
This file contains information that tells the Web Server when a page has been changed. For local MV files, this file contains items that are copies of the source HTML or Text content. For network files, this file contains items that contain the time/date stamp for the network directory entry. For binary items, this file is not used.
WWW.CTRL,PGDATA
This file contains web information pre-converted into web format. Binary items are stored as hex strings. Pages that contains active content will have multiple text attributes stored to facilitate efficient merging of web results into page templates.
WWW.CTRL,PGCTRL
This file contains web control information for each web page. This tells the web server whether a subroutine is associated with the page and what type of data and MIME type is involved.  HTTP headers are also pre-computed and stored here.  You will also see the generated subroutine item-id for pages with active content in this file.
WWW.CTRL,PGBASIC
This file contains generated MV/Basic source code for pages that contain active content. Generated subroutine have item-ids that are addigned sequentially starting with WEB$ as in:
WEB$00000347
WWW.CTRL,PGBASICXREF
This file has the same item-id format as the WWW.CTRL,PGBASIC file and contains the URL for a subroutine that is generated.
WWW.CTRL,DTA
This file contains run-time parsing information about web directories for each running web process.
WWW.CTRL,LOCAL.PAGES
This file contains local web pages and graphics that are used for default error message pages.  You can access web content by specifying a URL that begins with an ampersand '&".
WWW.CTRL,APP.STATES
This file is used to store state information used by the mv/Web environment.
WWW.CTRL,CONN
This file contains information about currently opened TCP/IP connections.
WWW.CTRL,LOCK
This file is empty and is used as a placekeeper for PicLan-IP to set execution READU locks.
WWW.CTRL,PROCESSES
This file is used by PicLan-IP web processes internally.
WWW.CTRL,STATES
This file is used by PicLan-IP web processes to manage connection states.
WWW.CTRL,WORK
This is a temporary work file
 
The PicLan-IP web server will automatically clean-up and delete old versions of generated object code every 30 minutes.

Types of Web Files

There are actually five types of PicLan-IP Web Server directory types:

Web Directory Definitions

PicLan-IP Web Server directory definitions define the "rules" that the web server uses in responding to HTTP requests. Each HTTP DIR entry in the web server configuration file defines a TCP address and port to "listen" to for connections, a file structure directory, what type of directory is in use (FILE, HOST, HOST-RAW, DSG, or DSG-RAW), a number of parameters for each type of directory, and possible options. Here is the complete definitions for each of the possible web file types:

MV FILE Definitions

HTTP DIR=addr:port WebDir FILE FName (options) [name]

Host File System HOST Definitions

HTTP DIR=addr:port WebDir HOST HostPath (options) [name]

Host File System HOST-RAW Definitions

HTTP DIR=addr:port WebDir HOST-RAW HostPath (options) [name]

DOS Services Gateway DSG Definitions

HTTP DIR=addr:port WebDir DSG DsgName DsgDir (options) [name]

DOS Services Gateway DSG-RAW Definitions

HTTP DIR=addr:port WebDir DSG-RAW DsgName DsgDir (options) [name]
In each case the following definitions apply:
addr
This is the IP address that the web server will respond to. If a * is specified, the web server will use the first IP address specified in the TCP/IP stack configuration.
port
This is the TCP port number that the web server will respond to. The default TCP HTTP port of 80 should be specified for most applications although other ports number can be used if desired.
WebDir
This is the base directory that this entry will process. The "root" directory is specified as a forward slash /. Virtual sub-directories can be specified here as /dir/. Be sure to both begin and end the directory specification with forward slashes.
FName
This is the base name of a MV data file (created with the four data portions described above) that is used to store or cache web content items. The data file can be stored either in the PICLAN-IP account or elsewhere so long as it can be accessed via a Q-pointer in the PICLAN-IP account.
DsgName
This is the name of a PicLan DOS Services Gateway that will be used to retrieve pages.
HostPath
This is the path used to access a host file system file. In most cases, this path should end with a '/' character.
DsgPath
This is the base drive letter and directory that will pre-pended to the file name when retrieving files through a PicLan DOS Services Gateway. This parameter should always end with a / as in c:/www/.
options
The optional options that are available are:
name
This optional field allows you to create a "name" for a configuration item. This name is used to name items in the WWW.CTRL subfiles.  If you do not include a name, the server's IP address will be used as the name. The primary reason for a name field is to allow web sites to be pre-cached.

How Directories are Resolved

If it is possible for several directory definitions to process a single request, then the directory definition that is "longest" will be used. For example, if the configuration file contains:
HTTP DIR=*:80 / FILE WWW.ROOT (S
HTTP DIR=*:80 /IMAGES/ DSG WWW.DSG DSG1 C:/IMAGES/
An HTTP request with the file specification of /images/a3.gif will use line two and reference the file through the DSG where a reference of /text/x1.txt will use line one and reference the file locally.

Case Sensitivity

All PicLan-IP Web file references are converted to "upper case" for storage in local file systems. Host file names on case sensitive hosts (such as Unix) are converted to "lower case" when accessing the local host's file systems. This means:
Store all MV data items with upper-case item-ids.

Store all Unix data files with lower-case paths and file names.

Setting Up Multiple Configurations

Multiple configurations are no longer supported.

{INCLUDE _GEN_FTR.HTM}