VM:Webgateway Web Server
Select where you want to go:

Reference -
Commands

Select a command:

CONFIG FILETYPE Command    Authorization: SYSADMIN


Syntax | Parameters/Options | Examples

Defines a content filetype for a static file or a CGI program. You specify the content filetype by using it as the filetype of a CMS file or the extension of a BFS file, or by specifying it on a FILE directory control record.

Content filetypes for static files indicate:

  • The HTTP Content type that VM:Webgateway passes to the web browser
  • Whether VM:Webgateway should translate file data before delivering it to the web browser
  • The line end character that a BFS file uses
  • Whether VM:Webgateway should parse a file for server-side include (SSI) commands
  • Whether VM:Webgateway should run the data in the file through a filter before delivering it to the web browser

Content filetypes for CGI programs indicate:

  • The environment in which to run the CGI program
  • Whether VM:Webgateway should pass the HTTP Authorization request header to the CGI program

Syntax

To define or redefine a content filetype for a static file:

 CONFIG FILETYPE {ADD | REPLACE} content_filetype ...
... FILE CONTENT-TYPE type ...
... [TRANSLATE {NONE | tablename}] ...
... [BFSLINEND {CRLF | NEWLINE | NONE}] ...
... [SSI {NO | YES}] ...
... [FILTER {NONE | ...
... WORKERPIPE delim name args delim}]

To define or redefine a content filetype for a CGI program:

 CONFIG FILETYPE {ADD | REPLACE} content_filetype ...
... CGI ENVIRONMENT {SVMEXEC | WORKEREXEC | ...
... SVMWEBSHARE | WORKERWEBSHARE} ...
... [AUTHHEADERPASSED {YES | NO}]

To delete a content filetype:

CONFIG FILETYPE DELETE content_filetype

Parameters/Options

content_filetype
Name of the content filetype you are defining, redefining, or deleting. Specify 1-8 characters; specify only characters that are valid in CMS filetypes. VM:Webgateway stores the content filetype in upper case. You cannot specify pattern matching characters in content_filetype.

FILE
Keyword indicating that you are defining or redefining a content filetype for a static file. This keyword must precede the CONTENT-TYPE, TRANSLATE, SSI, and FILTER parameters. You cannot specify the FILE and CGI keywords in the same command.

CONTENT-TYPE type
HTTP Content type you want VM:Webgateway to send to the web browser. Because some web browsers treat the content type as case sensitive, VM:Webgateway preserves the case you specify for type. Ensure that the web browsers your users use support the type you specify. For a list of content types supported by many web browsers, refer to Common Content Types.

[TRANSLATE {NONE | tablename}]
Whether VM:Webgateway should perform character set translation on the data in the file.

Specify NONE if you do not want VM:Webgateway to translate the file data. For example, if you have binary data such as images that is already in ASCII, specify NONE to prevent VM:Webgateway from translating the file data. If you specify TRANSLATE NONE, you must also specify SSI NO.

Use the tablename parameter to specify a translation table if you want VM:Webgateway to translate the data into a character set used by a particular language.

The default is TRANSLATE NONE.

[BFSLINEND {CRLF | NEWLINE | NONE}]
Which line end character a BFS file uses.

Specify CRLF for a BFS text file that uses the CRLF character, NEWLINE for a BFS text file that uses the NEWLINE character, and NONE for a BFS binary file.

When VM:Webgateway serves a BFS file, it must insert a CRLF at the end of each line (in place of the existing CRLF or NEWLINE character) so the browser can determine where each line ends.

If you specify CRLF or NONE, VM:Webgateway can compute the size of the BFS file so a web browser can display the status of bytes received and bytes left to receive. If you specify NEWLINE, VM:Webgateway cannot determine the size of the file because it alters the size of the file by inserting a CRLF character at the end of each line. Therefore, VM:Webgateway does not send the file size in an HTTP header and the web browser does not display progress messages.

VM:Webgateway only uses the BFS line end characteristic when serving a BFS file.

[SSI {NO | YES}]
Whether VM:Webgateway should parse the file for SSI commands.

If you specify SSI YES, you must specify a translation table with the TRANSLATE parameter. Also, you must specify the FILTER NONE parameters.

When serving a file that VM:Webgateway parses for SSI commands, VM:Webgateway ensures that the web browser user always receives the latest version of the file by not setting the HTTP Last-Modified-Date header. As a result, for future requests for the file, the web browser asks the server for the file rather than using a version stored in cache.

The default is SSI NO.


Note: VM:Webgateway takes longer to serve an SSI parsable file than a non-parsable file because it must search for embedded SSI commands and, if it finds any, act on them.

[FILTER {NONE | ...
... WORKERPIPE delim name args delim}]
Whether VM:Webgateway should use a filter to reformat the file data before delivering the file to the web browser.

If you do not want to use a filter, specify NONE. To identify a filter, specify the following parameters:

WORKERPIPE
Keyword indicating that the filter runs on a worker machine.

delim
Unique character that separates the identification of the filter from the rest of the parameters on the command line. Use a character that is not used in any other part of the command. Because you cannot use the vertical solid bar (|) in name or args, it is a good choice for delim.

name
Filename of a file that contains a standard CMS PIPE stage. The filetype of the file must be REXX; the file must reside on a minidisk or SFS directory accessed by the VM:Webgateway SVM.

args
String of characters that VM:Webgateway passes to the filter. Do not specify the vertical solid bar (|) character in args because this is the default CMS Pipeline stage separator.

Before VM:Webgateway can serve a file that requires a filter, you must code the filter and place it on a minidisk or SFS directory accessed by the VM:Webgateway SVM.

If you use a filter, you must specify SSI NO. VM:Webgateway does not parse a file for server-side include commands if the file is to be processed by a filter.

The default is FILTER NONE.

CGI
Keyword indicating that you are defining or redefining a content filetype for a CGI program. This keyword must precede the ENVIRONMENT and AUTHHEADERPASSED parameters. You cannot specify the CGI and FILE keywords in the same command.

ENVIRONMENT {SVMEXEC | WORKEREXEC | SVMWEBSHARE | WORKERWEBSHARE}
Environment in which VM:Webgateway should run the CGI program.
Environment The CGI program runs:
SVMEXEC As an EXEC on the VM:Webgateway SVM
WORKEREXEC As an EXEC on a VM:Webgateway worker machine
SVMWEBSHARE In Webshare compatibility mode on the VM:Webgateway SVM
WORKERWEBSHARE In Webshare compatibility mode on a VM:Webgateway worker machine

Before VM:Webgateway can serve a CGI program that is to run on a worker, a VM:Webgateway system administrator must configure worker machines.


Note: You cannot serve CGI programs that run in Webshare compatibility mode from a BFS directory.

[AUTHHEADERPASSED {NO | YES}]
Whether VM:Webgateway should pass the HTTP Authorization request header to the CGI program.

If you specify AUTHHEADERPASSED NO, VM:Webgateway does not present the actual values for the following CGI variables. Instead, VM:Webgateway presents the values for the CGI variables as null strings.

  • REMOTE_USER
  • AUTH_TYPE
  • HTTP_AUTHORIZATION
  • X_OFF_VERIFIED
  • X_OFF_PRIVATE_INFO

If you specify AUTHHEADERPASSED YES, VM:Webgateway presents the actual values for the CGI variables.

The default is AUTHHEADERPASSED NO.

Examples

  • You want to define the content filetype NOPARSE to tell VM:Webgateway to:

    • Pass the content type text/html to the web browser
    • Translate the file data from its EBCDIC representation to its equivalent U.S. English ASCII representation
    • Pass the size of BFS files to the web browser
    • Not parse the file for SSI commands
    • Not use a filter on the file

    Enter the following command from the VM:Webgateway SVM:

    config filetype add noparse file content-type text/html translate usenglish bfslinend crlf ssi no filter none

  • You want to define the content filetype PARSE to tell VM:Webgateway to:

    • Pass the content type text/html to the web browser
    • Translate the file data from its EBCDIC representation to its equivalent U.S. English ASCII representation
    • Use the NEWLINE line end character for BFS files
    • Parse the file for SSI commands
    • Not use a filter

    Enter the following command from the VM:Webgateway SVM:

    config filetype add parse file content-type text/html translate usenglish bfslinend newline ssi yes filter none

  • You want to define the content filetype HTMLFREN to tell VM:Webgateway to:

    • Pass the content type text/html to the web browser
    • Translate the file data from its EBCDIC representation to its equivalent French ASCII representation
    • Not parse the file for SSI commands
    • Not use a filter on the file

    Enter the following command from the VM:Webgateway SVM:

    config filetype add htmlfren file content-type text/html translate french ssi no filter none

  • You want to define the content filetype BOOK2HTM to tell VM:Webgateway to:

    • Use the filter BMGR2HTM REXX that reformats BookManager files into HTML
    • Pass the content type text/html to the web browser because the filter creates an HTML file
    • Not translate the file because the filter performs translation
    • Not to parse for SSI commands

    Enter the following command from the VM:Webgateway SVM:

    config filetype add book2htm file content-type text/html translate none ssi no filter workerpipe |bmgr2htm book2htm (to ascii|

  • You want to define the content filetype B2HTRANS to tell VM:Webgateway to:

    • Use the filter BMGR2HTM REXX that reformats BookManager files into HTML
    • Pass the content type text/html to the web browser because the filter creates an HTML file
    • Translate the data that is returned from the filter from its EBCDIC representation to its equivalent ASCII representation using a character set for the U.S. English language
    • Not to parse for SSI commands

    Enter the following command from the VM:Webgateway SVM:

    config filetype add b2htrans file content-type text/html translate usenglish ssi no filter workerpipe |bmgr2htm (notrans|

  • You want to redefine the content filetype IMAGEGIF so VM:Webgateway does not perform translation and to use no line end command if the file is a BFS file. Enter the following command from the VM:Webgateway SVM:

    config filetype replace imagegif file content-type image/gif translate none bfslinend none

  • You want to define the content filetype CGIWEBSH to tell VM:Webgateway to:

    • Run the CGI program in Webshare compatibility mode on the VM:Webgateway SVM
    • Pass the HTTP Authorization request header to the CGI program, if requested

    Enter the following command from the VM:Webgateway SVM:

    config filetype add cgiwebsh cgi environment svmwebshare authheaderpassed yes

  • You want to define the content filetype WEBSHWRK to tell VM:Webgateway to:

    • Run the CGI program in Webshare compatibility mode on a VM:Webgateway worker
    • Not pass the HTTP Authorization request header to the CGI program

    Enter the following command from the VM:Webgateway SVM:

    config filetype add webshwrk cgi environment workerwebshare authheaderpassed no

  • You want to define the content filetype CGIEXEC to tell VM:Webgateway to:

    • Run the CGI program as an EXEC on the VM:Webgateway SVM
    • Not pass the HTTP Authorization request header to the CGI program

    Enter the following command from a VM userid with SYSADMIN authorization:

    vmwebsrv config filetype replace cgiexec cgi environment svmexec authheaderpassed no

  • You want to delete the content filetype PLAIN. Enter the following command from a VM userid with SYSADMIN authorization:

    vmwebsrv config filetype delete plain


Top
Select where you want to go:

Copyright © 1998, Sterling Software, Inc.